[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Endianness macros capitalization
From: |
Pavel Roskin |
Subject: |
Re: Endianness macros capitalization |
Date: |
Wed, 09 Jul 2008 02:47:27 -0400 |
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
- Endianness macros capitalization, Javier Martín, 2008/07/05
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/05
- Re: Endianness macros capitalization, Javier Martín, 2008/07/05
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/05
- Re: Endianness macros capitalization, Robert Millan, 2008/07/06
- Re: Endianness macros capitalization, Javier Martín, 2008/07/06
- Re: Endianness macros capitalization, Christian Franke, 2008/07/07
- Re: Endianness macros capitalization, Christian Franke, 2008/07/08
- Re: Endianness macros capitalization,
Pavel Roskin <=
- Re: Endianness macros capitalization, Christian Franke, 2008/07/09
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/09
- Re: Endianness macros capitalization, Christian Franke, 2008/07/10
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/10
- Re: Endianness macros capitalization, Jordi Mallach, 2008/07/11
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/11
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/11
- Re: Endianness macros capitalization, Christian Franke, 2008/07/11
- Re: Endianness macros capitalization, Pavel Roskin, 2008/07/11
- Re: Endianness macros capitalization, Christian Franke, 2008/07/20