LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Arjan van de Ven <arjan@infradead.org>, Andi Kleen <ak@muc.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [patch] x86: add -freg-struct-return to CFLAGS
Date: Thu, 22 Feb 2007 09:38:22 +0100	[thread overview]
Message-ID: <20070222083822.GB15068@elte.hu> (raw)
In-Reply-To: <45DD4FA0.5030205@goop.org>

Subject: [patch] x86: add -freg-struct-return to CFLAGS
From: Ingo Molnar <mingo@elte.hu>

Jeremy Fitzhardinge suggested the use of -freg-struct-return, which does 
structure-returns (such as when using pte_t) in registers instead of on 
the stack.

that is indeed so, and this option reduced the kernel size a bit:

    text    data     bss     dec     hex filename
 4799506  543456 3760128 9103090  8ae6f2 vmlinux.before
 4798117  543456 3760128 9101701  8ae185 vmlinux.after

the resulting kernel booted fine on my testbox. Lets go for it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/i386/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/arch/i386/Makefile
===================================================================
--- linux.orig/arch/i386/Makefile
+++ linux/arch/i386/Makefile
@@ -31,7 +31,7 @@ LDFLAGS_vmlinux := --emit-relocs
 endif
 CHECKFLAGS	+= -D__i386__
 
-CFLAGS += -pipe -msoft-float -mregparm=3
+CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
 
 # prevent gcc from keeping the stack 16 byte aligned
 CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)

  parent reply	other threads:[~2007-02-22  8:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22  1:28 -freg-struct-return? Jeremy Fitzhardinge
2007-02-22  8:04 ` -freg-struct-return? Arjan van de Ven
2007-02-22  8:09   ` -freg-struct-return? Jeremy Fitzhardinge
2007-02-22  8:15     ` -freg-struct-return? Arjan van de Ven
2007-02-22  8:30       ` -freg-struct-return? Jeremy Fitzhardinge
2007-02-22  8:37       ` -freg-struct-return? Ingo Molnar
2007-02-22  8:38     ` Ingo Molnar [this message]
2007-02-22 11:23       ` [patch] x86: add -freg-struct-return to CFLAGS Andi Kleen
2007-02-22 11:27         ` Arjan van de Ven
2007-02-22 18:35       ` Adrian Bunk
2007-02-22 22:31         ` H. Peter Anvin
2007-02-22  9:50     ` -freg-struct-return? Jakub Jelinek
2007-02-22 11:22     ` -freg-struct-return? Andi Kleen
2007-02-22 16:42       ` -freg-struct-return? H. Peter Anvin
2007-02-22 17:39         ` -freg-struct-return? Jeremy Fitzhardinge
2007-02-22 18:36           ` -freg-struct-return? Andi Kleen
2007-02-22 18:48             ` -freg-struct-return? H. Peter Anvin
2007-02-23  0:21               ` -freg-struct-return? Andi Kleen
2007-02-22 18:56             ` -freg-struct-return? Jan Engelhardt
2007-02-22 19:12               ` -freg-struct-return? H. Peter Anvin

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=20070222083822.GB15068@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@muc.de \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [patch] x86: add -freg-struct-return to CFLAGS' \
    /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

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 NNTP newsgroup(s).