This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs 1.0.2 VS. gcc 2.7.X on sparc


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]