------- Comment #8 from rob1weld at aol dot com 2009-01-31 21:01 ------- Sometimes you can skirt around the "GENERAL_REGS" error with other options.
When I use "-O0", "-O1", "-O2", "-O3", "-Os" I get different results. Using "-O0" produces no screen output _or_ compiled file (thus it 'looks' as though it compiled OK). # gcc -ffloat-store -msse3 -mssse3 -m3dnow -msse4.1 -mfpmath=sse,387 -I./../arch/386 -I. -Wall -O0 -fomit-frame-pointer -fforce-addr -DHAVE_CONFIG_H -DFORCE_LL -DFORCE_REG -DDEFAULTPATH='".:/usr/local/lib/gforth/site-forth:/usr/local/share/gforth/site-forth:/usr/local/lib/gforth/0.7.0:/usr/local/share/gforth/0.7.0"' -fexceptions -fno-gcse -fno-strict-aliasing -fno-crossjumping -fno-reorder-blocks -falign-labels=1 -falign-loops=1 -falign-jumps=1 -fno-defer-pop -fcaller-saves -fno-inline -o engine-fast-ll-reg.o -c ./engine.c # # ls -lrtA | tail -1 -rwxr-xr-x 1 root root 126938 Jan 31 12:20 gforth-fast-ll # See that "-O0" gives no screen output and no compiled file output. # gcc -ffloat-store -msse3 -mssse3 -m3dnow -msse4.1 -mfpmath=sse,387 -I./../arch/386 -I. -Wall -O1 -fomit-frame-pointer -fforce-addr -DHAVE_CONFIG_H -DFORCE_LL -DFORCE_REG -DDEFAULTPATH='".:/usr/local/lib/gforth/site-forth:/usr/local/share/gforth/site-forth:/usr/local/lib/gforth/0.7.0:/usr/local/share/gforth/0.7.0"' -fexceptions -fno-gcse -fno-strict-aliasing -fno-crossjumping -fno-reorder-blocks -falign-labels=1 -falign-loops=1 -falign-jumps=1 -fno-defer-pop -fcaller-saves -fno-inline -o engine-fast-ll-reg.o -c ./engine.c ./engine.c: In function 'gforth_engine': ./engine.c:460: error: unable to find a register to spill in class 'DIREG' ./engine.c:460: error: this is the insn: (insn 5800 13080 5801 850 prim:1699 (parallel [ (set (reg:SI 2 cx [2364]) (unspec:SI [ (mem:BLK (reg/f:SI 1 dx [orig:2366 D.8048 ] [2366]) [0 A8]) (reg:QI 0 ax [2368]) (const_int 1 [0x1]) (reg:SI 2 cx [2367]) ] 30)) (clobber (reg/f:SI 1 dx [orig:2366 D.8048 ] [2366])) (clobber (reg:CC 17 flags)) ]) 864 {*strlenqi_1} (expr_list:REG_DEAD (reg:QI 0 ax [2368]) (expr_list:REG_DEAD (reg:SI 2 cx [2367]) (expr_list:REG_DEAD (reg/f:SI 1 dx [orig:2366 D.8048 ] [2366]) (expr_list:REG_UNUSED (reg/f:SI 1 dx [orig:2366 D.8048 ] [2366]) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil))))))) ./engine.c:460: confused by earlier errors, bailing out # # gcc -ffloat-store -msse3 -mssse3 -m3dnow -msse4.1 -mfpmath=sse,387 -I./../arch/386 -I. -Wall -O3 -fomit-frame-pointer -fforce-addr -DHAVE_CONFIG_H -DFORCE_LL -DFORCE_REG -DDEFAULTPATH='".:/usr/local/lib/gforth/site-forth:/usr/local/share/gforth/site-forth:/usr/local/lib/gforth/0.7.0:/usr/local/share/gforth/0.7.0"' -fexceptions -fno-gcse -fno-strict-aliasing -fno-crossjumping -fno-reorder-blocks -falign-labels=1 -falign-loops=1 -falign-jumps=1 -fno-defer-pop -fcaller-saves -fno-inline -o engine-fast-ll-reg.o -c ./engine.c ./engine.c: In function 'gforth_engine': ./engine.c:460: error: unable to find a register to spill in class 'GENERAL_REGS' ./engine.c:460: error: this is the insn: (insn:HI 2564 2563 2565 367 prim-fast.i:4090 (set (reg:DI 2196) (mem/s/j/c:DI (plus:SI (reg/f:SI 20 frame) (const_int -180 [0xffffffffffffff4c])) [0 _d.d+0 S8 A32])) 88 {*movdi_2} (nil)) ./engine.c:460: confused by earlier errors, bailing out # # gcc -ffloat-store -msse3 -mssse3 -m3dnow -msse4.1 -mfpmath=sse,387 -I./../arch/386 -I. -Wall -Os -fomit-frame-pointer -fforce-addr -DHAVE_CONFIG_H -DFORCE_LL -DFORCE_REG -DDEFAULTPATH='".:/usr/local/lib/gforth/site-forth:/usr/local/share/gforth/site-forth:/usr/local/lib/gforth/0.7.0:/usr/local/share/gforth/0.7.0"' -fexceptions -fno-gcse -fno-strict-aliasing -fno-crossjumping -fno-reorder-blocks -falign-labels=1 -falign-loops=1 -falign-jumps=1 -fno-defer-pop -fcaller-saves -fno-inline -o engine-fast-ll-reg.o -c ./engine.c ./engine.c: In function 'gforth_engine': ./engine.c:460: error: unable to find a register to spill in class 'DIREG' ./engine.c:460: error: this is the insn: (insn:HI 1623 1621 1624 230 prim:662 (parallel [ (set (reg:SI 2 cx [orig:2148 u ] [2148]) (const_int 0 [0x0])) (set (reg/f:SI 0 ax [orig:2146 c_addr ] [2146]) (plus:SI (reg/v/f:SI 1943 [ c_addr ]) (reg/v:SI 2 cx [orig:1942 u ] [1942]))) (set (mem:BLK (reg/v/f:SI 1943 [ c_addr ]) [0 A8]) (const_int 0 [0x0])) (use (subreg:QI (reg:SI 1 dx [orig:1278 spTOS.757 ] [1278]) 0)) (use (reg/v:SI 2 cx [orig:1942 u ] [1942])) ]) 858 {*rep_stosqi} (expr_list:REG_DEAD (reg/v/f:SI 1943 [ c_addr ]) (expr_list:REG_DEAD (reg/v:SI 2 cx [orig:1942 u ] [1942]) (expr_list:REG_DEAD (reg:SI 1 dx [orig:1278 spTOS.757 ] [1278]) (expr_list:REG_UNUSED (reg:SI 2 cx [orig:2148 u ] [2148]) (expr_list:REG_UNUSED (reg/f:SI 0 ax [orig:2146 c_addr ] [2146]) (nil))))))) ./engine.c:460: confused by earlier errors, bailing out # If I compile "-O1" and remove the "-fomit-frame-pointer" option then the output (error message) is the same as: "-O1 -fomit-frame-pointer". If I compile "-Os" and remove the "-fomit-frame-pointer" option then the output (error message) is the same as: "-Os -fomit-frame-pointer". If I compile "-O0", "-O2" or "-O3" and remove the "-fomit-frame-pointer" option then the output (error message) is the same as if I had used: "-O2 -fomit-frame-pointer". Even stripping the gcc command to the bare minimum can not skirt the lack of enough registers to compile this code: # gcc -I./../arch/386 -I. -Wall -DHAVE_CONFIG_H -DFORCE_LL -DFORCE_REG -DDEFAULTPATH='".:/usr/local/lib/gforth/site-forth:/usr/local/share/gforth/site-forth:/usr/local/lib/gforth/0.7.0:/usr/local/share/gforth/0.7.0"' -o engine-fast-ll-reg.o -c ./engine.c ./engine.c: In function 'gforth_engine': ./engine.c:460: error: unable to find a register to spill in class 'GENERAL_REGS' ./engine.c:460: error: this is the insn: (insn 3333 3332 3334 360 prim-fast.i:3818 (set (reg:DI 4692) (mem/s/j/c:DI (plus:SI (reg/f:SI 20 frame) (const_int -4844 [0xffffffffffffed14])) [0 _d.d+0 S8 A32])) 88 {*movdi_2} (nil)) ./engine.c:460: confused by earlier errors, bailing out Thanks, Rob -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35135