From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KKZEE-0003RR-QB for mharc-grub-devel@gnu.org; Sun, 20 Jul 2008 09:45:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKZEC-0003RD-SG for grub-devel@gnu.org; Sun, 20 Jul 2008 09:45:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKZEB-0003R0-9a for grub-devel@gnu.org; Sun, 20 Jul 2008 09:45:32 -0400 Received: from [199.232.76.173] (port=50356 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKZEA-0003Qx-Us for grub-devel@gnu.org; Sun, 20 Jul 2008 09:45:31 -0400 Received: from mailout10.t-online.de ([194.25.134.21]:45187) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKZEA-0006Dj-FI for grub-devel@gnu.org; Sun, 20 Jul 2008 09:45:30 -0400 Received: from fwd29.aul.t-online.de by mailout10.sul.t-online.de with smtp id 1KKZE8-00038o-03; Sun, 20 Jul 2008 15:45:28 +0200 Received: from [10.3.2.2] (Xd+ciaZVZhHRIlPawqLPppkw6+Tj7q7XkXgsXpq+lk4P4XjKGq9vYJSVMCVa5gRZ2p@[217.235.228.136]) by fwd29.aul.t-online.de with esmtp id 1KKZDw-0B2ypM0; Sun, 20 Jul 2008 15:45:16 +0200 Message-ID: <48834166.7050906@t-online.de> Date: Sun, 20 Jul 2008 15:45:10 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: The development of GRUB 2 References: <1215264476.26019.160.camel@localhost> <1215293427.17114.2.camel@dv> <1215298499.26019.192.camel@localhost> <20080706183042.GA22023@thorin> <1215374534.26019.194.camel@localhost> <48726DB3.9000809@t-online.de> <4873AC32.3060004@t-online.de> <1215586047.31230.27.camel@dv> <1KGZ7b-1EcJsG0@fwd32.aul.t-online.de> In-Reply-To: <1KGZ7b-1EcJsG0@fwd32.aul.t-online.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: Xd+ciaZVZhHRIlPawqLPppkw6+Tj7q7XkXgsXpq+lk4P4XjKGq9vYJSVMCVa5gRZ2p X-TOI-MSGID: 405cd9f1-b302-4d23-9250-0fe60e1007e8 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: Endianness macros capitalization X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2008 13:45:33 -0000 Christian Franke wrote: > Pavel Roskin wrote: > >> On Tue, 2008-07-08 at 20:04 +0200, Christian Franke wrote: >> >> >>> With old gcc versions without the "rol" optimization, even the 16 >>> bit swap should be a function: >>> >>> >> Or better yet, an asm statement. >> >> We should consider optimized assembly vs function call. Even the >> 32-bit swap could be shorter: >> >> a: 86 c4 xchg %al,%ah >> c: c1 c0 10 rol $0x10,%eax >> f: 86 c4 xchg %al,%ah >> 11: >> >> That's 7 bytes! ... >> > > But the function call in the 32-bit case requires only 5 bytes :-) > Sorry, I was wrong here. The assumption about function call size was only true for module-local calls. If a module calls a function in kernel, each 5 byte call requires another 8 bytes for the ELF relocation table entry. Christian