Browse Source
* 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.callout
11 changed files with 61 additions and 19 deletions
@ -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 |
|||
Loading…
Reference in new issue