[PATCH] h8300: add minimal support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 Makefile       |  1 +
 machine.h      |  1 +
 target-h8300.c | 27 +++++++++++++++++++++++++++
 target.c       |  2 ++
 target.h       |  1 +
 5 files changed, 32 insertions(+)
 create mode 100644 target-h8300.c

diff --git a/Makefile b/Makefile
index 35098940080b..d7cfe4f5c4f6 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/machine.h b/machine.h
index 7407e71627e1..1b8b862a5175 100644
--- a/machine.h
+++ b/machine.h
@@ -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 000000000000..47872b38a1ad
--- /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,
+};
diff --git a/target.c b/target.c
index e512f7f1b618..b39661515005 100644
--- a/target.c
+++ b/target.c
@@ -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, },
diff --git a/target.h b/target.h
index 8f79426c096a..45ee40f1ca12 100644
--- a/target.h
+++ b/target.h
@@ -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;

base-commit: bb372492c40d71cc27952e815612db36aadf65bb
-- 
2.27.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux