public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/45835] New: Consider push simm8;pop reg for -Os
@ 2010-09-29 15:54 jakub at gcc dot gnu.org
2011-08-26 9:22 ` [Bug target/45835] " jakub at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-09-29 15:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45835
Summary: Consider push simm8;pop reg for -Os
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
CC: uros@gcc.gnu.org, hjl@gcc.gnu.org
Target: x86_64-linux
http://embed.cs.utah.edu/embarrassing/jan_10/ snippets suggest that for -Os
(not sure if just for -m32 or even -m64) icc generates shorter sequences for
loading signed 8 bit immediates into registers.
movl $1, %eax is 5 bytes long, while pushl $1; popl %eax is 3 byte long for
-m32
(and similarly pushq $1; popq %rax for -m64). For r8..r15 push/pop is 4 bytes,
while movl is 6 bytes.
Not sure about the performance implications and whether it shouldn't be
something controllable by some -m* switch for users like Linux kernel which
want -Os primarily to improve performance and if the push/pop would be
significantly slower they might not appreciate it.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/45835] Consider push simm8;pop reg for -Os
2010-09-29 15:54 [Bug target/45835] New: Consider push simm8;pop reg for -Os jakub at gcc dot gnu.org
@ 2011-08-26 9:22 ` jakub at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-26 9:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45835
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-26 08:46:48 UTC ---
As measurements show, it is indeed significantly slower. So if we want to do
it, we'd need a switch to disable that.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-26 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-29 15:54 [Bug target/45835] New: Consider push simm8;pop reg for -Os jakub at gcc dot gnu.org
2011-08-26 9:22 ` [Bug target/45835] " jakub at gcc dot gnu.org
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).