From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KFaR5-0000Du-Sy for mharc-grub-devel@gnu.org; Sun, 06 Jul 2008 16:02:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KFaR4-0000C8-O1 for grub-devel@gnu.org; Sun, 06 Jul 2008 16:02:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KFaQz-0008Uq-BW for grub-devel@gnu.org; Sun, 06 Jul 2008 16:02:14 -0400 Received: from [199.232.76.173] (port=53215 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFaQz-0008Ui-7T for grub-devel@gnu.org; Sun, 06 Jul 2008 16:02:09 -0400 Received: from ug-out-1314.google.com ([66.249.92.168]:41686) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KFaQy-0001pp-PP for grub-devel@gnu.org; Sun, 06 Jul 2008 16:02:09 -0400 Received: by ug-out-1314.google.com with SMTP id l31so1426849ugc.48 for ; Sun, 06 Jul 2008 13:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=B+LLwlgMVhIhUxF3RG/9G+JVC/Wdmvja2/YtUAoTriE=; b=Q622NrdKh/NiOF/gboNiFCOiTMTTitpL3jioPHNMOikdGfn2Hdi73NwxN+OphpFAi/ knm+PRgwEa6EF+RzN9NesnXIBLNrYhWZnjuqWr+SBOFTUyh/5lzMw7wTP2sbp+Bw43uD xSqJ+k++VNYUJLUgtrTPQQkaCE2ZYkLbfQfLA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=Uha7sgxHHrwgODGnco4TOza+n+SJSwN/lrT1PI7I2Pn08unG7symsj9HVoK7rXkWC3 6qjxF3hv1RghQFuyt/QoxKt04dMxUNK/Ld07lQOne1zi1+jiVo12iz+KTRsFyICmidf1 WxQKj2IUxKVW70lpyOFA9TedxaPZSzITyRmwg= Received: by 10.67.26.7 with SMTP id d7mr3967714ugj.44.1215374526692; Sun, 06 Jul 2008 13:02:06 -0700 (PDT) Received: from ?192.168.1.100? ( [213.37.137.93]) by mx.google.com with ESMTPS id j27sm1464327ugc.59.2008.07.06.13.02.04 (version=SSLv3 cipher=RC4-MD5); Sun, 06 Jul 2008 13:02:05 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <20080706183042.GA22023@thorin> References: <1215264476.26019.160.camel@localhost> <1215293427.17114.2.camel@dv> <1215298499.26019.192.camel@localhost> <20080706183042.GA22023@thorin> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ej8MxPGam3kE1LEWqMff" Date: Sun, 06 Jul 2008 22:02:14 +0200 Message-Id: <1215374534.26019.194.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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, 06 Jul 2008 20:02:15 -0000 --=-ej8MxPGam3kE1LEWqMff Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El dom, 06-07-2008 a las 20:30 +0200, Robert Millan escribi=C3=B3: > On Sun, Jul 06, 2008 at 12:54:58AM +0200, Javier Mart=C3=ADn wrote: > > El s=C3=A1b, 05-07-2008 a las 17:30 -0400, Pavel Roskin escribi=C3=B3: > > > They probably should be functions. We may want to sparse annotate GR= UB > > > one day, and then inline functions in the only way to go. > > Hmm... you mean changing this > >=20 > > #define grub_swap_bytes16(x) \ > > ({ \ > > grub_uint16_t _x =3D (x); \ > > (grub_uint16_t) ((_x << 8) | (_x >> 8)); \ > > }) > >=20 > > ...for this > >=20 > > inline grub_uint16_t grub_swap_bytes16(uint16_t x) > > { > > return (x << 8) | (x >> 8); > > } >=20 > I know I get to be annoying about this, but which of these two (plus the > non-inline version) would result in _smaller_ code? >=20 > Function calls on i386-pc are cheap (because we use the regparm hack), so > maybe it'd work better using normal functions. >=20 If we are to take the space-saving route, the best we can do is turn them to functions, maybe even _without_ the "inline" keyword, and GCC will do what's best. --=-ej8MxPGam3kE1LEWqMff Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASHEkxaSl+Fbdeo72AQJLQA//QD0d5uNyPRWrCpPGJt8jrWk2HkDwSUFO anxaZ3cwa7oVMpV9e9JNYGaQ/f852WgYM8H0Y3V4WrXtZ8HuD3nSJX9BOByGHrn6 hB8RbB31PC1ay+VKSoQfrxokCvuvI92BviWg4DA8M9saPh6Q/VlhqfH38wbjwAN4 MibypeQBEqfikSuD8t+BrP+1xMFLMDXU0Bre3st9Aib/lfbg8xeAtiGmurn058y+ v9kUml1mZfmAGjbUXBL62dQ92PfnO/tLSOMOqA398+EURj3PqQUSahAgpa8Ly3Da 29hjtXbfu8yva2ZCHr+hL1KnzUkTm9N0sw9EXc9xaD9s387KKVRVmYqdMQh80azY PJbsf8DJori5CI2mEktjGKWMK08L4pgYZ0lqjLkN9kyzsOkqXdYERKQiziStBF4d B87g3K0k6a9iPhDozhMBWrdvsK48T4yepq808psYTpxk7jv6L4VTsS7FiV2Sbj06 Gr4vMWVlHlGNGlirn6w7fVvGAFrc3etyjXAe6b28Bc7ExPeXFtaKGtR+pmmy/MjL /UlN6ZoS8j9MNxEWfqY/+8Omi2mOnP2LISyvaliQCxz1eOSDKlI8xZe2jXZghRPs 6HzdPNVdPuXbFqkLCjlUzLVx+EBB8LLjD4T974w4sVuu2p2fH5N1CVwBgEvrdRY9 du6N6y1YSCA= =PFYu -----END PGP SIGNATURE----- --=-ej8MxPGam3kE1LEWqMff--