summaryrefslogtreecommitdiff
path: root/arch/sh/lib/libgcc.h
diff options
context:
space:
mode:
authorPhil Edworthy <PHIL.EDWORTHY@renesas.com>2011-06-02 22:15:27 +0000
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2011-08-22 13:16:08 +0900
commiteeb84df6e43212a31e96402788ec9b3e39a399a6 (patch)
treedddfac8b8a475474d02f60e450653d3a1fa53577 /arch/sh/lib/libgcc.h
parent7fbeb6422d9fb32063c8357fcdee99f0088a1a7f (diff)
downloadu-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.h25
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 */