When compiling engine.c on arm, the compiler gets vastly confused:
gcc -I./../arch/generic -I. -O2 -Wall -g -O2 -DHAVE_CONFIG_H -DDEFAULTPATH=\".:/usr/lib/gforth/site-forth:/usr/share/gforth/site- forth:/usr/lib/gforth/0.6.1:/usr/share/gforth/0.6.1\" -fno-gcse
-fno-strict-aliasing -fno-defer-pop -fcaller-saves -DGFORTH_DEBUGGING -DENGINE=2 -o engine2.o -c ./engine.c
In file included from engine.c:23:
forth.h:186:2: warning: #warning flush-icache probably will not work (see manual)
forth.h:188:2: warning: #warning no FLUSH_ICACHE, turning off dynamic native code by default
In file included from engine.c:32:
threaded.h:222:2: warning: #warning direct threading scheme 6: long latency, cfa dead
/tmp/cchEYzjY.s: Assembler messages:
/tmp/cchEYzjY.s:5056: Warning: source register same as write-back base
/tmp/cchEYzjY.s:5148: Error: bad immediate value for offset (4116)
/tmp/cchEYzjY.s:5166: Error: bad immediate value for offset (4152)
/tmp/cchEYzjY.s:5170: Error: bad immediate value for offset (4156)
/tmp/cchEYzjY.s:5193: Error: bad immediate value for offset (4208)
/tmp/cchEYzjY.s:5197: Error: bad immediate value for offset (4212)
/tmp/cchEYzjY.s:5218: Error: bad immediate value for offset (4108)
<snip lots more error messages of this sort>
This bug was forwarded to gcc maintainers, who closed it as WONTFIX INVALID, as it relies on undefined behaviour, namely, using asm statements which take up more than 4 bytes per instruction; in this case, asm(".skip 16").
From http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11442 :
The documentation for ASM should probably be updated to make it clear that gcc
has to estimate the number of bytes that an ASM will generate and that the
estimate is based on the number of statements multiplied by the longest
instruction in the target. Use of any ASM statement that produces more bytes
than that should be considered "unspecified behaviour" (it might work on some
platforms all the time, but on others only some of the time).
Please see the above bugzilla entry for more detail.
If I get time this weekend, I'll try building it with four asm('.skip 4') and see if it works, but I must confess that ARM assembly is entirely new to me.
-=Eric
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
