Date: Tue, 19 Jul 2011 15:05:25 +0200 From: Robert Millan <rmh@debian.org> To: freebsd-mips@freebsd.org Subject: [PATCH] _MIPS_SIM builtin macro Message-ID: <CAOfDtXNhGs-piK4ZUe%2BO0Zb2wxi%2B8Vdg0PysXjRo04BQ=Bahhg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi,
Please could you define the _MIPS_SIM builtin macro on MIPS platforms? It is
defined in recent versions of GCC.
--
Robert Millan
[-- Attachment #2 --]
Index: contrib/gcc/config/mips/mips.h
===================================================================
--- contrib/gcc/config/mips/mips.h (revision 224025)
+++ contrib/gcc/config/mips/mips.h (working copy)
@@ -390,7 +390,30 @@
builtin_define ("__mips_isa_rev=2"); \
builtin_define ("_MIPS_ISA=_MIPS_ISA_MIPS64"); \
} \
+ \
+ switch (mips_abi) \
+ { \
+ case ABI_32: \
+ builtin_define ("_ABIO32=1"); \
+ builtin_define ("_MIPS_SIM=_ABIO32"); \
+ break; \
\
+ case ABI_N32: \
+ builtin_define ("_ABIN32=2"); \
+ builtin_define ("_MIPS_SIM=_ABIN32"); \
+ break; \
+ \
+ case ABI_64: \
+ builtin_define ("_ABI64=3"); \
+ builtin_define ("_MIPS_SIM=_ABI64"); \
+ break; \
+ \
+ case ABI_O64: \
+ builtin_define ("_ABIO64=4"); \
+ builtin_define ("_MIPS_SIM=_ABIO64"); \
+ break; \
+ } \
+ \
if (TARGET_HARD_FLOAT) \
builtin_define ("__mips_hard_float"); \
else if (TARGET_SOFT_FLOAT) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfDtXNhGs-piK4ZUe%2BO0Zb2wxi%2B8Vdg0PysXjRo04BQ=Bahhg>
