From: Ralph Schmidt <laire@basis.owl.de>
To: egcs@egcs.cygnus.com
Subject: PPC optimizing question
Date: Sat, 01 May 1999 03:52:00 -0000 [thread overview]
Message-ID: <199905011149.AA00556@basis.owl.de> (raw)
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
WARNING: multiple messages have this Message-ID
From: Ralph Schmidt <laire@basis.owl.de>
To: egcs@egcs.cygnus.com
Subject: PPC optimizing question
Date: Mon, 31 May 1999 21:36:00 -0000 [thread overview]
Message-ID: <199905011149.AA00556@basis.owl.de> (raw)
Message-ID: <19990531213600.IDeTEN2BZM4VeuOL_Dim0TZ8ho93gHQ3-GbpnJFi4_s@z> (raw)
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
next reply other threads:[~1999-05-01 3:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-01 3:52 Ralph Schmidt [this message]
1999-05-01 8:30 ` David Edelsohn
1999-05-31 21:36 ` David Edelsohn
1999-05-31 21:36 ` Ralph Schmidt
1999-05-01 16:01 Alex Rosenberg
1999-05-31 21:36 ` Alex Rosenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199905011149.AA00556@basis.owl.de \
--to=laire@basis.owl.de \
--cc=egcs@egcs.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).