summaryrefslogtreecommitdiff
path: root/include/linux/libgcc.h
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@sifive.com>2017-12-01 13:16:15 -0800
committerPalmer Dabbelt <palmer@sifive.com>2017-12-01 13:16:15 -0800
commit185e788c84a95cb024cff98988bdeb09e619cd62 (patch)
tree631ef70bbd4d47cf18ddcb7699b27eb74ce03bc8 /include/linux/libgcc.h
parent7382fbdeae0d6dbd1c26ebf4a302f1ccf33d9882 (diff)
parent4db2b604c05afc3d2678fe01d3136c015df313ec (diff)
move libgcc.h to include/linux
Diffstat (limited to 'include/linux/libgcc.h')
-rw-r--r--include/linux/libgcc.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/libgcc.h b/include/linux/libgcc.h
new file mode 100644
index 000000000000..32e1e0f4b2d0
--- /dev/null
+++ b/include/linux/libgcc.h
@@ -0,0 +1,43 @@
+/*
+ * include/lib/libgcc.h
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see the file COPYING, or write
+ * to the Free Software Foundation, Inc.
+ */
+
+#ifndef __LIB_LIBGCC_H
+#define __LIB_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 */