aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-12-28 07:33:39 +0000
committerRichard Stallman <rms@gnu.org>1992-12-28 07:33:39 +0000
commitd345a9814646a6c2c154bee5b61dfdfe88cc1145 (patch)
tree433377fa8a16752de31665954650d53f0074faed /gcc
parent969f50b9d9e16d623c0fea979416b9bbd6e34372 (diff)
downloadgcc-d345a9814646a6c2c154bee5b61dfdfe88cc1145.zip
gcc-d345a9814646a6c2c154bee5b61dfdfe88cc1145.tar.gz
gcc-d345a9814646a6c2c154bee5b61dfdfe88cc1145.tar.bz2
(CPP_SPEC): Define -D__i486__ if compile for i486.
(ASM_OUTPUT_ADDR_DIFF_ELT, JUMP_TABLES_IN_TEXT_SECTION): Copy definitions from i386v4.h to get PIC code correct. (FUNCTION_PROFILER): Copy definition from i386bsd.h. (COMMENT_BEGIN, ASM_APP_ON, ASM_APP_OFF): Copy from i386bsd.h to prepare for new GAS. From-SVN: r2967
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/linux.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
index 11651a3..70eca79 100644
--- a/gcc/config/i386/linux.h
+++ b/gcc/config/i386/linux.h
@@ -27,6 +27,13 @@
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Di386 -Dlinux"
+#undef CPP_SPEC
+#if TARGET_CPU_DEFAULT == 2
+#define CPP_SPEC "%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}"
+#else
+#define CPP_SPEC "%{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}"
+#endif
+
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
@@ -82,3 +89,50 @@
#define GPLUSPLUS_INCLUDE_DIR "/usr/g++-include"
#endif
+
+/* The following macros are copied from i386bsd.h. */
+
+/* Redefine this to use %eax instead of %edx. */
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER(FILE, LABELNO) \
+{ \
+ if (flag_pic) \
+ { \
+ fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n", \
+ LPREFIX, (LABELNO)); \
+ fprintf (FILE, "\tcall *_mcount@GOT(%%ebx)\n"); \
+ } \
+ else \
+ { \
+ fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO)); \
+ fprintf (FILE, "\tcall _mcount\n"); \
+ } \
+}
+
+/* There are conflicting reports about whether this system uses
+ a different assembler syntax. wilson@cygnus.com says # is right. */
+#undef COMMENT_BEGIN
+#define COMMENT_BEGIN "#"
+
+#undef ASM_APP_ON
+#define ASM_APP_ON "#APP\n"
+
+#undef ASM_APP_OFF
+#define ASM_APP_OFF "#NO_APP\n"
+
+/* The following macros are copied from i386v4.h. */
+
+/* These have to be defined to get PIC code correct */
+
+/* This is how to output an element of a case-vector that is relative.
+ This is only used for PIC code. See comments by the `casesi' insn in
+ i386.md for an explanation of the expression this outputs. */
+
+#undef ASM_OUTPUT_ADDR_DIFF_ELT
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
+ fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
+
+/* Indicate that jump tables go in the text section. This is
+ necessary when compiling PIC code. */
+
+#define JUMP_TABLES_IN_TEXT_SECTION