This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs 1.0.2 VS. gcc 2.7.X on sparc
- To: egcs at cygnus dot com
- Subject: egcs 1.0.2 VS. gcc 2.7.X on sparc
- From: Miklos Szeredi <Miklos dot Szeredi at eth dot ericsson dot se>
- Date: Fri, 27 Mar 1998 12:24:25 +0100
Hi!
In the following assemly listing egcs added a superfluous instruction
which an older gcc did not:
egcs:
ld [%i0+28],%o0
ldub [%o0],%o0
lduh [%i0+30],%o1
and %o0,0xff,%o0 <--- (I guess 'ldub' already does this)
sll %o0,2,%o0
ld [%l0+%o0],%o0
add %o1,1,%o1
call %o0,0
sth %o1,[%i0+30]
gcc:
ld [%i0+28],%o1
lduh [%i0+30],%o0
ldub [%o1],%o1
add %o0,1,%o0
sth %o0,[%i0+30]
sll %o1,2,%o1
ld [%l0+%o1],%o0
call %o0,0
nop
Why is this?
Thanks,
Miklos
Header of egcs assmbly listing:
! GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release) (sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
! options passed: -O3 -Wall -fomit-frame-pointer -funroll-loops
! options enabled: -fdefer-pop -fomit-frame-pointer -fcse-follow-jumps
! -fcse-skip-blocks -fexpensive-optimizations -fthread-jumps
! -fstrength-reduce -funroll-loops -fpeephole -fforce-mem -ffunction-cse
! -finline-functions -finline -fkeep-static-consts -fcaller-saves
! -fpcc-struct-return -fdelayed-branch -frerun-cse-after-loop
! -frerun-loop-opt -fschedule-insns -fschedule-insns2 -fcommon
! -fverbose-asm -fgnu-linker -fregmove -falias-check -fargument-alias
! -mepilogue -mapp-regs