This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED] [PATCH] powerpc: Fix encoding of POWER8 instruction
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 04 Nov 2014 06:35:22 -0200
- Subject: Re: [COMMITTED] [PATCH] powerpc: Fix encoding of POWER8 instruction
- Authentication-results: sourceware.org; auth=none
- References: <54577B27 dot 5010109 at linux dot vnet dot ibm dot com> <20141104031431 dot GA28914 at gate dot crashing dot org>
On 04-11-2014 01:14, Segher Boessenkool wrote:
> On Mon, Nov 03, 2014 at 10:55:03AM -0200, Adhemerval Zanella wrote:
>> +#include <endian.h>
>> +
>> +#if __BYTE_ORDER == __LITTLE_ENDIAN
>> +#define MTVSRD_V1_R4 .byte 0x66,0x01,0x24,0x7c /* mtvsrd v1,r4 */
>> +#else
>> +#define MTVSRD_V1_R4 .byte 0x7c,0x24,0x01,0x66
>> +#endif
> Why not just
>
> #define MTVSRD_V1_R4 .long 0x7c240166
>
> (which works in any endianness)?
I was not aware '.long' work in any endianess. I will change it, thanks.