aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@wasabisystems.com>2002-10-18 23:00:50 +0000
committerJason Thorpe <thorpej@gcc.gnu.org>2002-10-18 23:00:50 +0000
commit5791cc29703f503573795fb2ddfad79fb99e8be3 (patch)
treecf6d00e4ab5a65b48d5631ad751f795e94d77af1
parente4f4feba329d1cd7e3fe6fb40c93bdb532f6cb5d (diff)
downloadgcc-5791cc29703f503573795fb2ddfad79fb99e8be3.zip
gcc-5791cc29703f503573795fb2ddfad79fb99e8be3.tar.gz
gcc-5791cc29703f503573795fb2ddfad79fb99e8be3.tar.bz2
i386.c (x86_initialize_trampoline): Emit a call to __enable_execute_stack with the address of the trampoline if...
* config/i386/i386.c (x86_initialize_trampoline): Emit a call to __enable_execute_stack with the address of the trampoline if TRANSFER_FROM_TRAMPOLINE is defined. * config/i386/i386.h (TARGET_64BIT): Expand to a compile-time constant if building libgcc2. From-SVN: r58291
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c5
-rw-r--r--gcc/config/i386/i386.h11
3 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d0de30..53bbe9a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/i386/i386.c (x86_initialize_trampoline): Emit a call
+ to __enable_execute_stack with the address of the trampoline
+ if TRANSFER_FROM_TRAMPOLINE is defined.
+ * config/i386/i386.h (TARGET_64BIT): Expand to a compile-time
+ constant if building libgcc2.
+
2002-10-17 Roger Sayle <roger@eyesopen.com>
* doc/c-tree.texi: Update description of COND_EXPR tree nodes.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 739db6a..1ea90ee 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11713,6 +11713,11 @@ x86_initialize_trampoline (tramp, fnaddr, cxt)
if (offset > TRAMPOLINE_SIZE)
abort ();
}
+
+#ifdef TRANSFER_FROM_TRAMPOLINE
+ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
+ LCT_NORMAL, VOIDmode, 1, tramp, Pmode);
+#endif
}
#define def_builtin(MASK, NAME, TYPE, CODE) \
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 5409bcd..9e52d66 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -177,7 +177,15 @@ extern int target_flags;
/* Debug FUNCTION_ARG macros */
#define TARGET_DEBUG_ARG (ix86_debug_arg_string != 0)
-/* 64bit Sledgehammer mode */
+/* 64bit Sledgehammer mode. For libgcc2 we make sure this is a
+ compile-time constant. */
+#ifdef IN_LIBGCC2
+#ifdef __x86_64__
+#define TARGET_64BIT 1
+#else
+#define TARGET_64BIT 0
+#endif
+#else
#ifdef TARGET_BI_ARCH
#define TARGET_64BIT (target_flags & MASK_64BIT)
#else
@@ -187,6 +195,7 @@ extern int target_flags;
#define TARGET_64BIT 0
#endif
#endif
+#endif
#define TARGET_386 (ix86_cpu == PROCESSOR_I386)
#define TARGET_486 (ix86_cpu == PROCESSOR_I486)