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: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Mon, 3 Nov 2014 21:14:31 -0600
- 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>
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)?
Segher