diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-07-08 01:07:51 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-07-13 17:54:36 +0200 |
commit | 85fb62e73e82ba165fc2f1246d9096e94f268a60 (patch) | |
tree | 35979fe8769a5f6a24f3e1424dbda3fe41215906 | |
parent | 53ff1650faff3b0a7ebebd455e0d38c26162f9d1 (diff) | |
download | sparse-85fb62e73e82ba165fc2f1246d9096e94f268a60.tar.gz |
h8300: add minimal support
This is now the only architecture needing '-msize-long'.
Prepare the obsolescence of this option by adding the
target file for this architecture.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-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; |