aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog6
-rw-r--r--libgcc/config/i386/morestack.S34
2 files changed, 40 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index ea864d3..21099ab 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-07 Ian Lance Taylor <iant@google.com>
+
+ PR target/46089
+ * config/i386/morestack.S (__morestack_large_model): New
+ function.
+
2010-10-23 Nathan Froyd <froydnj@codesourcery.com>
* config/libbid/bid_gcc_intrinsics.h (LIBGCC2_WORDS_BIG_ENDIAN):
diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S
index 79abba3..10fa1fd 100644
--- a/libgcc/config/i386/morestack.S
+++ b/libgcc/config/i386/morestack.S
@@ -488,6 +488,40 @@ DW.ref.__gcc_personality_v0:
#endif
#endif
+#ifdef __x86_64__
+
+# This entry point is used for the large model. With this entry point
+# the upper 32 bits of %r10 hold the argument size and the lower 32
+# bits hold the new stack frame size. There doesn't seem to be a way
+# to know in the assembler code that we are assembling for the large
+# model, and there doesn't seem to be a large model multilib anyhow.
+# If one is developed, then the non-PIC code is probably OK since we
+# will probably be close to the morestack code, but the PIC code
+# almost certainly needs to be changed. FIXME.
+
+ .text
+ .global __morestack_large_model
+ .hidden __morestack_large_model
+
+#ifdef __ELF__
+ .type __morestack_large_model,@function
+#endif
+
+__morestack_large_model:
+
+ .cfi_startproc
+
+ movq %r10, %r11
+ andl $0xffffffff, %r10d
+ sarq $32, %r11
+ jmp __morestack
+
+ .cfi_endproc
+#ifdef __ELF__
+ .size __morestack_large_model, . - __morestack_large_model
+#endif
+
+#endif /* __x86_64__ */
# Initialize the stack test value when the program starts or when a
# new thread starts. We don't know how large the main stack is, so we