This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMITTED] [PATCH] powerpc: Fix encoding of POWER8 instruction


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]