Poor code generation

Andi Kleen ak@muc.de
Wed Mar 31 23:54:00 GMT 1999


Kevin.Hughes@icl.com writes:

> I have extracted a "simple" case of poor code generation we have been
> chasing for some time - trying to alter the c++/assembler until it generated
> good code. We took this approach due to the inline assembler functions. Alas
> we failed and conclude the compiler is getting confused.
[...]
Trying to compile it with a recent egcs snapshot on Linux results in: 

kali:~/src/test% /pkg/egcs/bin/g++ -v
Reading specs from /pkg/egcs-19990321/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.13/specs
gcc version egcs-2.93.13 19990321 (gcc2 ss-980929 experimental)
kali:~/src/test% /pkg/egcs/bin/g++ -O2 -fomit-frame-pointer -S tpoor.c
tpoor.c: In function `VA test()':
tpoor.c:93: internal error--unrecognizable insn:
(insn/i 50 93 51 (parallel[ 
            (set (reg:DI 1 %edx)
                (asm_operands/v ("movl	$2, %4
		movl	%%fs:4(%2), %1
		movl	$0, %4
		movl	%1, %%fs:4(%2)
		bswap	%%edx
		movl	%%edx, %%fs:(%2)
		bswap	%%eax
		movl	%%eax, %%fs:4(%2)") ("=&A") 0[ 
                        (reg:SI 0 %eax)
                        (reg:DI 1 %edx)
                        (mem/f:SI (symbol_ref:SI ("WrCheckFlag")) 4)
                    ] 
                    [ 
                        (asm_input:SI ("q"))
                        (asm_input:DI ("0"))
                        (asm_input:SI ("m"))
                    ]  ("tpoor.c") 71))
            (set (reg:SI 3 %ebx)
                (asm_operands/v ("movl	$2, %4
		movl	%%fs:4(%2), %1
		movl	$0, %4
		movl	%1, %%fs:4(%2)
		bswap	%%edx
		movl	%%edx, %%fs:(%2)
		bswap	%%eax
		movl	%%eax, %%fs:4(%2)") ("=&q") 1[ 
                        (reg:SI 0 %eax)
                        (reg:DI 1 %edx)
                        (mem/f:SI (symbol_ref:SI ("WrCheckFlag")) 4)
                    ] 
                    [ 
                        (asm_input:SI ("q"))
                        (asm_input:DI ("0"))
                        (asm_input:SI ("m"))
                    ]  ("tpoor.c") 71))
        ] ) -1 (insn_list 41 (insn_list 45 (nil)))
    (nil))
../../egcs/gcc/toplev.c:1453: Internal compiler error in function fatal_insn
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
kali:~/src/test% 

-Andi

-- 
This is like TV. I don't like TV.



More information about the Gcc-bugs mailing list