From 6041792ec6b89f5e9eae79d8addbb0f706f9addd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 16 Jul 2013 07:48:53 +0000 Subject: * configure.host: Change to microblaze*. * libc/include/machine/ieeefp.h: Add __MICROBLAZEEL__. * libc/machine/microblaze/mb_endian.h: New file. * newlib/libc/machine/microblaze/strcmp.c: Add little endian support. * newlib/libc/machine/microblaze/strcpy.c: Likewise. * newlib/libc/machine/microblaze/strlen.c: Likewise. * configure.in: Change to microblaze*. * configure: Regenerate. * microblaze/xilinx.ld: Remove OUTPUT_FORMAT. --- newlib/libc/machine/microblaze/mb_endian.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 newlib/libc/machine/microblaze/mb_endian.h (limited to 'newlib/libc/machine/microblaze/mb_endian.h') diff --git a/newlib/libc/machine/microblaze/mb_endian.h b/newlib/libc/machine/microblaze/mb_endian.h new file mode 100644 index 000000000..fb217ec85 --- /dev/null +++ b/newlib/libc/machine/microblaze/mb_endian.h @@ -0,0 +1,15 @@ +#ifndef _MB_ENDIAN_H +#define _MB_ENDIAN_H + +/* Convenience macros for loading and store 4 bytes in a byte invariant way with + * a singe instruction. Endianess affects this and we rely on MicroBlaze + * load/store reverse instructions to do the trick on little-endian systems. + */ +#ifdef __LITTLE_ENDIAN__ +#define LOAD4BYTES(rD,rA,rB) "\tlwr\t" rD ", " rA ", " rB "\n" +#define STORE4BYTES(rD,rA,rB) "\tswr\t" rD ", " rA ", " rB "\n" +#else +#define LOAD4BYTES(rD,rA,rB) "\tlw\t" rD ", " rA ", " rB "\n" +#define STORE4BYTES(rD,rA,rB) "\tsw\t" rD ", " rA ", " rB "\n" +#endif +#endif -- cgit v1.2.3