aboutsummaryrefslogtreecommitdiffstats
path: root/roms/openbios/libgcc/libgcc.h
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2019-04-29 01:17:54 +0100
committerfishsoupisgood <github@madingley.org>2019-05-27 03:43:43 +0100
commit3f2546b2ef55b661fd8dd69682b38992225e86f6 (patch)
tree65ca85f13617aee1dce474596800950f266a456c /roms/openbios/libgcc/libgcc.h
downloadqemu-master.tar.gz
qemu-master.tar.bz2
qemu-master.zip
Initial import of qemu-2.4.1HEADmaster
Diffstat (limited to 'roms/openbios/libgcc/libgcc.h')
-rw-r--r--roms/openbios/libgcc/libgcc.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/roms/openbios/libgcc/libgcc.h b/roms/openbios/libgcc/libgcc.h
new file mode 100644
index 00000000..fc82397d
--- /dev/null
+++ b/roms/openbios/libgcc/libgcc.h
@@ -0,0 +1,45 @@
+#ifndef _LIBGCC_H
+#define _LIBGCC_H
+
+#include "asm/types.h"
+
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+typedef int SItype __attribute__ ((mode (SI)));
+typedef unsigned int USItype __attribute__ ((mode (SI)));
+typedef int DItype __attribute__ ((mode (DI)));
+typedef unsigned int UDItype __attribute__ ((mode (DI)));
+typedef int word_type __attribute__ ((mode (__word__)));
+
+uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t *rem);
+
+int64_t __divdi3(int64_t num, int64_t den);
+uint64_t __udivdi3(uint64_t num, uint64_t den);
+
+uint64_t __umoddi3(uint64_t num, uint64_t den);
+
+DItype __ashldi3 (DItype u, word_type b);
+DItype __lshrdi3 (DItype u, word_type b);
+DItype __ashrdi3 (DItype u, word_type b);
+
+// Must be implemented outside:
+void __divide_error(void);
+
+#if defined(__arch64__) || defined(__LP64__)
+typedef int TItype __attribute__ ((mode (TI)));
+
+__uint128_t __udivmodti4(__uint128_t num, __uint128_t den, __uint128_t *rem);
+
+__int128_t __divti3(__int128_t num, __int128_t den);
+__uint128_t __udivti3(__uint128_t num, __uint128_t den);
+
+__uint128_t __umodti3(__uint128_t num, __uint128_t den);
+
+TItype __multi3 (TItype u, TItype v);
+TItype __negti2 (TItype u);
+
+#endif
+
+#endif /* _LIBGCC_H */