[PATCH 1/3] mips: add predefines __MIPSEL__ or __MIPSEB__ & friends

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

 



Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 target-mips.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/target-mips.c b/target-mips.c
index 3d73236feffd..1ff0760c2446 100644
--- a/target-mips.c
+++ b/target-mips.c
@@ -10,6 +10,16 @@ static void predefine_mips(const struct target *self)
 	predefine("_MIPS_SZINT", 1, "%d", int_ctype.bit_size);
 	predefine("_MIPS_SZLONG", 1, "%d", long_ctype.bit_size);
 	predefine("_MIPS_SZPTR", 1, "%d", ptr_ctype.bit_size);
+
+	if (arch_big_endian) {
+		predefine("_MIPSEB", 1, "1");
+		predefine("__MIPSEB", 1, "1");
+		predefine("__MIPSEB__", 1, "1");
+	} else {
+		predefine("_MIPSEL", 1, "1");
+		predefine("__MIPSEL", 1, "1");
+		predefine("__MIPSEL__", 1, "1");
+	}
 }
 
 
-- 
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