Do you get the same effect if you drop the -O2? Turning off optimization?
Probably a lot fo people know this but I was tyring to compile something that broke and I narrowed it down to a few lines of code. I thought I might post it here just incase somebody was savy enough to troubleshoot it. I built this from the ezx-crosstool-0.5 set of patches. Only happens with -O2
Code:$ /opt/ezx-crosstool/bin/arm-linux-gcc -O2 -o boom boom.c boom.c: In function `func1': boom.c:24: error: unable to find a register to spill in class `LO_REGS' boom.c:24: error: this is the insn: (insn:HI 73 86 75 3 0x18dd0360 (set (reg/v:DI 5 r5 [57]) (ashift:DI (reg/v:DI 5 r5 [57]) (subreg:SI (reg/v:DI 41 wr10 [56]) 0))) 450 {ashldi3_iwmmxt} (insn_list 47 (insn_list 45 (nil))) (expr_list:REG_DEAD (reg/v:DI 41 wr10 [56]) (expr_list:REG_EQUAL (ashift:DI (const_int 1 [0x1]) (subreg:SI (reg/v:DI 41 wr10 [56]) 0)) (nil)))) boom.c:24: confused by earlier errors, bailing out $ /opt/ezx-crosstool/bin/arm-linux-gcc --version arm-linux-gcc (GCC) 3.3.6
<pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
mkswap -v0 /ram/awesomeswap 16384
sync
swapon /ram/awesomeswap</pre>
Do you get the same effect if you drop the -O2? Turning off optimization?
Nope. Only -O2 and -O3. I can do -O1 or -Os and it will compile. I can do any other experiements that you would like, just let me know. I re-built the crosstool without iwmmxt and I'm going to try -O2 and -O3 later on today (I have company over now).
Daniel
<pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
mkswap -v0 /ram/awesomeswap 16384
sync
swapon /ram/awesomeswap</pre>
Ok, so it works with -O0, -O1 and -Os, but not -O2 or -O3. Also, it does compile with the same toolchain built without the iwmmxt support.
I made minor changes to the boom.c so it would compile without warnings and then I did a -S for both the iwmmxt and non-iwmmxt using all 5 of the above optomization flags.Code:/c/Projects/a780/software/boom (Daniel@loudmouth) $ /opt/ezx-crosstool-0.5-iwmmxt/bin/arm-linux-gcc -O2 -S -c boom.c boom.c: In function `func1': boom.c:27: error: unable to find a register to spill in class `LO_REGS' boom.c:27: error: this is the insn: (insn:HI 73 86 75 3 0x18dd0360 (set (reg/v:DI 5 r5 [57]) (ashift:DI (reg/v:DI 5 r5 [57]) (subreg:SI (reg/v:DI 41 wr10 [56]) 0))) 450 {ashldi3_iwmmxt} (insn_list 47 (insn_list 45 (nil))) (expr_list:REG_DEAD (reg/v:DI 41 wr10 [56]) (expr_list:REG_EQUAL (ashift:DI (const_int 1 [0x1]) (subreg:SI (reg/v:DI 41 wr10 [56]) 0)) (nil)))) boom.c:27: confused by earlier errors, bailing out /c/Projects/a780/software/boom (Daniel@loudmouth) $ /opt/ezx-crosstool-0.5-iwmmxt/bin/arm-linux-gcc -O3 -S -c boom.c boom.c: In function `func1': boom.c:27: error: unable to find a register to spill in class `LO_REGS' boom.c:27: error: this is the insn: (insn:HI 73 86 75 3 0x18dd0360 (set (reg/v:DI 5 r5 [57]) (ashift:DI (reg/v:DI 5 r5 [57]) (subreg:SI (reg/v:DI 41 wr10 [56]) 0))) 450 {ashldi3_iwmmxt} (insn_list 47 (insn_list 45 (nil))) (expr_list:REG_DEAD (reg/v:DI 41 wr10 [56]) (expr_list:REG_EQUAL (ashift:DI (const_int 1 [0x1]) (subreg:SI (reg/v:DI 41 wr10 [56]) 0)) (nil)))) boom.c:27: confused by earlier errors, bailing out
I wish I could do more, but I don't know gcc that intimately and I don't know ARM assembly eitherLet me know if there's anything else I can do. Also, who else do you think might be able to address this type of problem? I'm not actually doing any GUI stuff right now so it shouldn't effect me at the moment.
Daniel
<pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
mkswap -v0 /ram/awesomeswap 16384
sync
swapon /ram/awesomeswap</pre>