aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/target-sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc.c')
-rw-r--r--target-sparc.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/target-sparc.c b/target-sparc.c
new file mode 100644
index 00000000..ca9589f5
--- /dev/null
+++ b/target-sparc.c
@@ -0,0 +1,37 @@
+#include "symbol.h"
+#include "target.h"
+#include "machine.h"
+
+
+static void init_sparc32(const struct target *target)
+{
+ if (arch_os == OS_SUNOS) {
+ wint_ctype = &long_ctype;
+ wchar_ctype = &long_ctype;
+
+ bits_in_longdouble = 128;
+ max_fp_alignment = 16;
+ }
+}
+
+const struct target target_sparc32 = {
+ .mach = MACH_SPARC32,
+ .bitness = ARCH_LP32,
+ .big_endian = 1,
+ .unsigned_char = 0,
+
+ .bits_in_longdouble = 64,
+ .max_fp_alignment = 8,
+
+ .init = init_sparc32,
+ .target_64bit = &target_sparc64,
+};
+
+const struct target target_sparc64 = {
+ .mach = MACH_SPARC64,
+ .bitness = ARCH_LP64,
+ .big_endian = 1,
+ .unsigned_char = 0,
+
+ .target_32bit = &target_sparc32,
+};