diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | machine.h | 1 | ||||
-rw-r--r-- | target-h8300.c | 27 | ||||
-rw-r--r-- | target.c | 2 | ||||
-rw-r--r-- | target.h | 1 |
5 files changed, 32 insertions, 0 deletions
@@ -73,6 +73,7 @@ LIB_OBJS += target-arm.o LIB_OBJS += target-arm64.o LIB_OBJS += target-bfin.o LIB_OBJS += target-default.o +LIB_OBJS += target-h8300.o LIB_OBJS += target-m68k.o LIB_OBJS += target-microblaze.o LIB_OBJS += target-mips.o @@ -34,6 +34,7 @@ enum machine { MACH_S390, MACH_S390X, MACH_ALPHA, MACH_BFIN, + MACH_H8300, MACH_M68K, MACH_MICROBLAZE, MACH_NIOS2, diff --git a/target-h8300.c b/target-h8300.c new file mode 100644 index 00000000..47872b38 --- /dev/null +++ b/target-h8300.c @@ -0,0 +1,27 @@ +#include "symbol.h" +#include "target.h" +#include "machine.h" + + +static void init_h8300(const struct target *self) +{ + ssize_t_ctype = &long_ctype; + size_t_ctype = &ulong_ctype; + wchar_ctype = &ushort_ctype; +} + +static void predefine_h8300(const struct target *self) +{ + predefine("__H8300H__", 1, "1"); +} + +const struct target target_h8300 = { + .mach = MACH_H8300, + .bitness = ARCH_LP32, + .big_endian = true, + + .bits_in_longdouble = 64, + + .init = init_h8300, + .predefine = predefine_h8300, +}; @@ -61,6 +61,7 @@ static const struct target *targets[] = { [MACH_ARM] = &target_arm, [MACH_ARM64] = &target_arm64, [MACH_BFIN] = &target_bfin, + [MACH_H8300] = &target_h8300, [MACH_I386] = &target_i386, [MACH_M68K] = &target_m68k, [MACH_MICROBLAZE] = &target_microblaze, @@ -92,6 +93,7 @@ enum machine target_parse(const char *name) { "arm64", MACH_ARM64, 64, }, { "arm", MACH_ARM, 32, }, { "bfin", MACH_BFIN, 32, }, + { "h8300", MACH_H8300, 32, }, { "i386", MACH_I386, 32, }, { "m68k", MACH_M68K, 32, }, { "microblaze", MACH_MICROBLAZE,32, }, @@ -85,6 +85,7 @@ extern const struct target target_alpha; extern const struct target target_arm; extern const struct target target_arm64; extern const struct target target_bfin; +extern const struct target target_h8300; extern const struct target target_m68k; extern const struct target target_microblaze; extern const struct target target_mips32; |