summaryrefslogtreecommitdiff
path: root/arch/microblaze/lib/libgcc.h
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-08-12 14:28:53 +0200
committerMichal Simek <monstr@monstr.eu>2010-10-21 15:51:42 +1000
commit4e07dba7cb8c9c76a52d0e32b69f13bb583a9674 (patch)
tree2f12579e642d5eea3c28f4b7c51a35a465b5e2a2 /arch/microblaze/lib/libgcc.h
parentcec051671dc2bb72cc2870aa149d7101ea494b8b (diff)
microblaze: Add libgcc function directly to kernel
Replaced libgcc functions with asm optimized implementation. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/lib/libgcc.h')
-rw-r--r--arch/microblaze/lib/libgcc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/microblaze/lib/libgcc.h b/arch/microblaze/lib/libgcc.h
new file mode 100644
index 000000000000..05909d58e2fe
--- /dev/null
+++ b/arch/microblaze/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 */