This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
PPC optimizing question
- To: egcs at egcs dot cygnus dot com
- Subject: PPC optimizing question
- From: Ralph Schmidt <laire at basis dot owl dot de>
- Date: Sat, 1 May 99 12:49:22 +0100
- Reply-To: laire at popmail dot owl dot de
Can somebody explain me why egcs saves the LR
register and not simply does a
li 3,2
b O2 ?
for a simple void function or if the return
type is compatible i can't see a reason this
wouldn't be possible.
gcc -S -O2 -fomit-frame-pointer test4.c
typedef unsigned long ULONG ;
//register ULONG pc __asm("r11");
void O2(int Size)
{
}
void O3(void)
{
O2(2);
}
O2:
blr
O3:
stwu 1,-16(1)
mflr 0
stw 0,20(1)
li 3,2
bl O2
lwz 0,20(1)
mtlr 0
la 1,16(1)
blr
---
Ralph Schmidt,laire@popmail.owl.de(private),NextMail welcome