mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 03:19:54 +08:00
6041792ec6
* 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.
16 lines
581 B
C
16 lines
581 B
C
#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
|