summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-03-02 05:59:14 +0000
committerimp <imp@FreeBSD.org>2010-03-02 05:59:14 +0000
commit8f72bf4ef06c0868171b0ca88af8f0671c7aedee (patch)
tree8e7f0cf146393010e90b1f845425d290766ead8f /contrib/gcc/config
parent2da2a3c2f17ca48c5c05b6816cf3edc13fc23281 (diff)
downloadFreeBSD-src-8f72bf4ef06c0868171b0ca88af8f0671c7aedee.zip
FreeBSD-src-8f72bf4ef06c0868171b0ca88af8f0671c7aedee.tar.gz
Bring in more built-in defines from NetBSD
a few #defines from JC. # tested only with o32 at the moment Submitted by: C. Jayachandran (CJ) Obtained from: NetBSD
Diffstat (limited to 'contrib/gcc/config')
-rw-r--r--contrib/gcc/config/mips/freebsd.h87
1 files changed, 73 insertions, 14 deletions
diff --git a/contrib/gcc/config/mips/freebsd.h b/contrib/gcc/config/mips/freebsd.h
index b53dae6..6627e03 100644
--- a/contrib/gcc/config/mips/freebsd.h
+++ b/contrib/gcc/config/mips/freebsd.h
@@ -130,10 +130,67 @@ Boston, MA 02110-1301, USA. */
if (TARGET_MIPS16) \
builtin_define ("__mips16"); \
\
+ if (mips_abi == ABI_N32) \
+ { \
+ builtin_define ("__mips_n32"); \
+ builtin_define ("_ABIN32=2"); \
+ builtin_define ("_MIPS_SIM=_ABIN32"); \
+ builtin_define ("_MIPS_SZLONG=32"); \
+ builtin_define ("_MIPS_SZPTR=32"); \
+ } \
+ else if (mips_abi == ABI_64) \
+ { \
+ builtin_define ("__mips_n64"); \
+ builtin_define ("_ABI64=3"); \
+ builtin_define ("_MIPS_SIM=_ABI64"); \
+ builtin_define ("_MIPS_SZLONG=64"); \
+ builtin_define ("_MIPS_SZPTR=64"); \
+ } \
+ else if (mips_abi == ABI_O64) \
+ { \
+ builtin_define ("__mips_o64"); \
+ builtin_define ("_ABIO64=4"); \
+ builtin_define ("_MIPS_SIM=_ABIO64"); \
+ builtin_define ("_MIPS_SZLONG=64"); \
+ builtin_define ("_MIPS_SZPTR=64"); \
+ } \
+ else if (mips_abi == ABI_EABI) \
+ { \
+ builtin_define ("__mips_eabi"); \
+ builtin_define ("_ABIEMB=5"); \
+ builtin_define ("_MIPS_SIM=_ABIEMB"); \
+ if (TARGET_LONG64) \
+ builtin_define ("_MIPS_SZLONG=64"); \
+ else \
+ builtin_define ("_MIPS_SZLONG=32"); \
+ if (TARGET_64BIT) \
+ builtin_define ("_MIPS_SZPTR=64"); \
+ else \
+ builtin_define ("_MIPS_SZPTR=32"); \
+ } \
+ else \
+ { \
+ builtin_define ("__mips_o32"); \
+ builtin_define ("_ABIO32=1"); \
+ builtin_define ("_MIPS_SIM=_ABIO32"); \
+ builtin_define ("_MIPS_SZLONG=32"); \
+ builtin_define ("_MIPS_SZPTR=32"); \
+ } \
+ if (TARGET_FLOAT64) \
+ builtin_define ("_MIPS_FPSET=32"); \
+ else \
+ builtin_define ("_MIPS_FPSET=16"); \
+ \
+ builtin_define ("_MIPS_SZINT=32"); \
+ \
MIPS_CPP_SET_PROCESSOR ("_MIPS_ARCH", mips_arch_info); \
MIPS_CPP_SET_PROCESSOR ("_MIPS_TUNE", mips_tune_info); \
\
- if (ISA_MIPS3) \
+ if (ISA_MIPS1) \
+ builtin_define ("__mips=1"); \
+ else if (ISA_MIPS2) \
+ builtin_define ("__mips=2"); \
+ else if (ISA_MIPS3) \
builtin_define ("__mips=3"); \
else if (ISA_MIPS4) \
builtin_define ("__mips=4"); \
@@ -152,7 +209,12 @@ Boston, MA 02110-1301, USA. */
builtin_define ("__mips=64"); \
builtin_define ("__mips_isa_rev=1"); \
} \
- \
+/* else if (ISA_MIPS64R2) \
+ { \
+ builtin_define ("__mips=64"); \
+ builtin_define ("__mips_isa_rev=2"); \
+ } \
+*/ \
if (TARGET_HARD_FLOAT) \
builtin_define ("__mips_hard_float"); \
else if (TARGET_SOFT_FLOAT) \
@@ -167,18 +229,6 @@ Boston, MA 02110-1301, USA. */
builtin_define ("__MIPSEL__"); \
\
/* No language dialect defines. */ \
- \
- if (mips_abi == ABI_EABI) \
- builtin_define ("__mips_eabi"); \
- else if (mips_abi == ABI_N32) \
- builtin_define ("__mips_n32"); \
- else if (mips_abi == ABI_64) \
- builtin_define ("__mips_n64"); \
- else if (mips_abi == ABI_O64) \
- builtin_define ("__mips_o64"); \
- else \
- builtin_define ("__mips_o32"); \
- \
if (TARGET_ABICALLS) \
builtin_define ("__ABICALLS__"); \
} \
@@ -241,6 +291,15 @@ Boston, MA 02110-1301, USA. */
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."
+/* Currently we don't support 128bit long doubles, so for now we force
+ n32 to be 64bit. */
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
+
+#ifdef IN_LIBGCC2
+#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
+#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
+#endif
/************************[ Debugger stuff ]*********************************/
OpenPOWER on IntegriCloud