From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KGTSg-0007QH-NS for mharc-grub-devel@gnu.org; Wed, 09 Jul 2008 02:47:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGTSf-0007P5-Ep for grub-devel@gnu.org; Wed, 09 Jul 2008 02:47:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGTSd-0007Od-QX for grub-devel@gnu.org; Wed, 09 Jul 2008 02:47:32 -0400 Received: from [199.232.76.173] (port=42363 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGTSd-0007Oa-LH for grub-devel@gnu.org; Wed, 09 Jul 2008 02:47:31 -0400 Received: from mx20.gnu.org ([199.232.41.8]:26272) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KGTSc-0003HY-VT for grub-devel@gnu.org; Wed, 09 Jul 2008 02:47:31 -0400 Received: from c60.cesmail.net ([216.154.195.49]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KGTSc-0003DN-81 for grub-devel@gnu.org; Wed, 09 Jul 2008 02:47:30 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 09 Jul 2008 02:47:29 -0400 Received: from [192.168.0.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id E915D618F22 for ; Wed, 9 Jul 2008 02:47:28 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <4873AC32.3060004@t-online.de> 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> Content-Type: text/plain Date: Wed, 09 Jul 2008 02:47:27 -0400 Message-Id: <1215586047.31230.27.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 7bit X-detected-kernel: by mx20.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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: Wed, 09 Jul 2008 06:47:33 -0000 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! And if written properly, it could work with any of the registers that allow access to the lower two bytes (%eax, %ebx, %ecx and %edx), thus giving more flexibility to the optimizer. -- Regards, Pavel Roskin