aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/target-openrisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-openrisc.c')
-rw-r--r--target-openrisc.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/target-openrisc.c b/target-openrisc.c
new file mode 100644
index 00000000..553963c0
--- /dev/null
+++ b/target-openrisc.c
@@ -0,0 +1,26 @@
+#include "symbol.h"
+#include "target.h"
+#include "machine.h"
+
+
+static void init_openrisc(const struct target *self)
+{
+ wchar_ctype = &uint_ctype;
+}
+
+static void predefine_openrisc(const struct target *self)
+{
+ predefine_weak("__OR1K__");
+ predefine_weak("__or1k__");
+}
+
+const struct target target_openrisc = {
+ .mach = MACH_NDS32,
+ .bitness = ARCH_LP32,
+ .big_endian = true,
+
+ .bits_in_longdouble = 64,
+
+ .init = init_openrisc,
+ .predefine = predefine_openrisc,
+};