egcs-2.91.66 PPC register bug
Ralph Schmidt
laire@basis.owl.de
Thu Jun 24 04:08:00 GMT 1999
Though a register content is defined as unsigned and a target variable
is also marked unsigned it creates a signed value.
P.S. Is it possible after 2.95 to discuss some PPC optimizer misses
as you all seem to be very busy at the moment with the 2.95 release ?
################################################
struct Fubar
{
signed char A;
};
register unsigned int REG_PTR __asm("25");
register unsigned int REG_A __asm("16");
void Test4(void)
{
unsigned int A;
A =(unsigned int) (((struct Fubar*)REG_PTR)->A);
REG_A = A;
}
results into this program
.file "test.c"
# rs6000/powerpc options: -msdata=data -G 8
# options passed: -mregnames -O2 -fverbose-asm
# options enabled: -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps
# -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps
# -fstrength-reduce -fpeephole -fforce-mem -ffunction-cse -finline
# -fkeep-static-consts -fcaller-saves -fpcc-struct-return -fgcse
# -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns
# -fschedule-insns2 -fsched-interblock -fsched-spec -fsjlj-exceptions
# -fcommon -fverbose-asm -fgnu-linker -fregmove -foptimize-register-move
# -fargument-alias -mpowerpc -mnew-mnemonics -mregnames -mcall-sysv
# -msdata=data
gcc2_compiled.:
.section ".text"
.align 2
.globl Test4
.type Test4,@function
Test4:
lbz %r0,0(%r25)
extsb %r16,%r0
***************** In my eyes this is wrong.
blr
.Lfe1:
.size Test4,.Lfe1-Test4
.ident "GCC: (GNU) egcs-2.91.66 19990314 (egcs-1.1.2 release)"
---
Ralph Schmidt,laire@popmail.owl.de(private),NextMail welcome
More information about the Gcc-bugs
mailing list