diff options
author | Phil Edworthy <PHIL.EDWORTHY@renesas.com> | 2011-06-02 22:15:27 +0000 |
---|---|---|
committer | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2011-08-22 13:16:08 +0900 |
commit | eeb84df6e43212a31e96402788ec9b3e39a399a6 (patch) | |
tree | dddfac8b8a475474d02f60e450653d3a1fa53577 /arch/sh/lib/libgcc.h | |
parent | 7fbeb6422d9fb32063c8357fcdee99f0088a1a7f (diff) | |
download | u-boot-imx-eeb84df6e43212a31e96402788ec9b3e39a399a6.zip u-boot-imx-eeb84df6e43212a31e96402788ec9b3e39a399a6.tar.gz u-boot-imx-eeb84df6e43212a31e96402788ec9b3e39a399a6.tar.bz2 |
sh: Add support for SH2A freestanding build
SH2A toolchains often only provide an fdpic version of libgcc. This
can't be used with bare-metal software like U-Boot, so this patch
provides the necessary functions extracted from libgcc.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'arch/sh/lib/libgcc.h')
-rw-r--r-- | arch/sh/lib/libgcc.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/sh/lib/libgcc.h b/arch/sh/lib/libgcc.h new file mode 100644 index 0000000..05909d5 --- /dev/null +++ b/arch/sh/lib/libgcc.h @@ -0,0 +1,25 @@ +#ifndef __ASM_LIBGCC_H +#define __ASM_LIBGCC_H + +#include <asm/byteorder.h> + +typedef int word_type __attribute__ ((mode (__word__))); + +#ifdef __BIG_ENDIAN +struct DWstruct { + int high, low; +}; +#elif defined(__LITTLE_ENDIAN) +struct DWstruct { + int low, high; +}; +#else +#error I feel sick. +#endif + +typedef union { + struct DWstruct s; + long long ll; +} DWunion; + +#endif /* __ASM_LIBGCC_H */ |