sh4 gcc problem
tanaka
tanaka@personal-media.co.jp
Tue Feb 25 06:43:00 GMT 2003
Hello all,
I met a problem, when I used gcc for sh4.
------ system ------
FreeBSD 4.5-RELEASE
- gcc configuration -
Configured with: ../gcc-3.2.2/configure --target=sh-unknown-elf
--with-gnu-as --with-gnu-ld --enable-languages=c
Thread model: single
gcc version 3.2.2
--------------------
Sample source code.
---- sh4vargtst.c ----
int main()
{
unsigned int x=1;
int bs=10, c;
c = x % bs;
return( c);
}
--------------------
/tmp/gcc/xgcc -B/tmp/gcc/ -g -m4 -little -c sh4vargtst.c -o sh4vargtst.o
--------------------
The program result is c = -9 .
I think udivsi3_i4 in gcc/config/sh/lib1funcs.asm is wrong.
When the same program is compiled with -mno-implicit-fp,
it run correct.
thanks for any help
tanaka
-------------------------
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list