summaryrefslogtreecommitdiff
path: root/gcc/config/i386/gnu-user-common.h
diff options
context:
space:
mode:
authorEnkovich Ilya <ilya.enkovich@intel.com>2012-04-13 17:21:06 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2012-04-13 10:21:06 -0700
commit70a6950958a6a5b902744b40786f4b34af9b6bc7 (patch)
tree23b97d5524b560ac4f26cd6d3aaf714e06de73eb /gcc/config/i386/gnu-user-common.h
parent65dc645a1506b95c45817f6b5281d975fecb9295 (diff)
downloadgcc-70a6950958a6a5b902744b40786f4b34af9b6bc7.tar.gz
Add and use config/i386/gnu-user-common.h
* config.gcc: Add i386/gnu-user-common.h before all i386/gnu-user.h and i386/gnu-user64.h usages. * config/i386/gnu-user-common.h: New. * config/i386/gnu-user.h (CPP_SPEC): Moved to gnu-user-common.h. (CC1_SPEC): Likewise. (ENDFILE_SPEC): Likewise. (DEFAULT_PCC_STRUCT_RETURN): Likewise. (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): Likewise. (TARGET_OS_CPP_BUILTINS): Likewise. (LIBGCC2_HAS_TF_MODE): Likewise. (LIBGCC2_TF_CEXT): Likewise. (TF_SIZE): Likewise. (TARGET_ASM_FILE_END): Likewise. (STACK_CHECK_MOVING_SP): Likewise. (STACK_CHECK_STATIC_BUILTIN): Likewise. * config/i386/gnu-user64.h: Likewise. From-SVN: r186427
Diffstat (limited to 'gcc/config/i386/gnu-user-common.h')
-rw-r--r--gcc/config/i386/gnu-user-common.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
new file mode 100644
index 00000000000..6ca954d55cc
--- /dev/null
+++ b/gcc/config/i386/gnu-user-common.h
@@ -0,0 +1,66 @@
+/* Common definitions for Intel 386 and AMD x86-64 systems using
+ GNU userspace. Copyright (C) 2012 Free Software Foundation, Inc.
+ Contributed by Ilya Enkovich.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* The svr4 ABI for the i386 says that records and unions are returned
+ in memory. In the 64bit compilation we will turn this flag off in
+ ix86_option_override_internal, as we never do pcc_struct_return
+ scheme on this target. */
+#undef DEFAULT_PCC_STRUCT_RETURN
+#define DEFAULT_PCC_STRUCT_RETURN 1
+
+/* We arrange for the whole %fs segment to map the tls area. */
+#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
+#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
+ } \
+ while (0)
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+#undef CC1_SPEC
+#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
+
+/* Similar to standard GNU userspace, but adding -ffast-math support. */
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+ %{mpc32:crtprec32.o%s} \
+ %{mpc64:crtprec64.o%s} \
+ %{mpc80:crtprec80.o%s} \
+ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
+
+/* Put all *tf routines in libgcc. */
+#undef LIBGCC2_HAS_TF_MODE
+#define LIBGCC2_HAS_TF_MODE 1
+#define LIBGCC2_TF_CEXT q
+#define TF_SIZE 113
+
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
+/* The stack pointer needs to be moved while checking the stack. */
+#define STACK_CHECK_MOVING_SP 1
+
+/* Static stack checking is supported by means of probes. */
+#define STACK_CHECK_STATIC_BUILTIN 1