gcc flag: what to add
Prasanta Sadhukhan
psadhukhan at gmail.com
Thu Apr 28 10:35:44 UTC 2011
Hi
I have downloaded the
http://www.codesourcery.com/sgpp/lite/superh/portal/subscription?@template=lite(GNU/Linux)
SH toolchain
and compiled a simple program for SH7712 chipset (which supports sh3/sh4
architecture) as below
using sh-linux-gnu-gcc -m3 -Wa,--isa=sh3
but I am getting "Illegal Instruction" for printing "float" value. If I
remove "float" usage then I can get the program to work
I tried -m4-nofpu & other -m flags but to no avail
#include <stdio.h>
void main()
{
int num=1;
float flnum=1.0;
if(*(char *)&num==1)
printf("Little Endian %f\n",flnum);
else
printf("Big Endian %f\n",flnum);
}
Can you please suggest as to what gcc flags I need to use to make the
program work. My original app use lots of float instructions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/superh-gnu-discuss/attachments/20110428/8161731a/attachment.html>
More information about the superh-gnu-discuss
mailing list