]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/commitdiff
- disable red zone for w64 abi.
authorPaweł Sikora <pluto@pld-linux.org>
Thu, 3 Jul 2008 13:09:03 +0000 (13:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    crossmingw64-gcc-no_red_zone.patch -> 1.1

crossmingw64-gcc-no_red_zone.patch [new file with mode: 0644]

diff --git a/crossmingw64-gcc-no_red_zone.patch b/crossmingw64-gcc-no_red_zone.patch
new file mode 100644 (file)
index 0000000..d7ce37a
--- /dev/null
@@ -0,0 +1,56 @@
+--- trunk/gcc/config/i386/i386.c       (wersja 136692)
++++ trunk/gcc/config/i386/i386.c       (wersja 136693)
+@@ -6388,7 +6388,7 @@
+       || (TARGET_64BIT && frame->to_allocate >= (HOST_WIDE_INT) 0x80000000))
+     frame->save_regs_using_mov = false;
+-  if (TARGET_RED_ZONE && current_function_sp_is_unchanging
++  if (!TARGET_64BIT_MS_ABI && TARGET_RED_ZONE && current_function_sp_is_unchanging
+       && current_function_is_leaf
+       && !ix86_current_function_calls_tls_descriptor)
+     {
+@@ -6631,7 +6631,7 @@
+      avoid doing this if I am going to have to probe the stack since
+      at least on x86_64 the stack probe can turn into a call that clobbers
+      a red zone location */
+-  if (TARGET_RED_ZONE && frame.save_regs_using_mov
++  if (!TARGET_64BIT_MS_ABI && TARGET_RED_ZONE && frame.save_regs_using_mov
+       && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT))
+     ix86_emit_save_regs_using_mov (frame_pointer_needed ? hard_frame_pointer_rtx
+                                  : stack_pointer_rtx,
+@@ -6689,7 +6689,7 @@
+     }
+   if (frame.save_regs_using_mov
+-      && !(TARGET_RED_ZONE
++      && !(!TARGET_64BIT_MS_ABI && TARGET_RED_ZONE
+          && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT)))
+     {
+       if (!frame_pointer_needed || !frame.to_allocate)
+@@ -21943,7 +21943,7 @@
+   rtx result;
+   gcc_assert (reload_completed);
+-  if (TARGET_RED_ZONE)
++  if (!TARGET_64BIT_MS_ABI && TARGET_RED_ZONE)
+     {
+       result = gen_rtx_MEM (mode,
+                           gen_rtx_PLUS (Pmode,
+@@ -21951,7 +21951,7 @@
+                                         GEN_INT (-RED_ZONE_SIZE)));
+       emit_move_insn (result, operand);
+     }
+-  else if (!TARGET_RED_ZONE && TARGET_64BIT)
++  else if ((TARGET_64BIT_MS_ABI || !TARGET_RED_ZONE) && TARGET_64BIT)
+     {
+       switch (mode)
+       {
+@@ -22018,7 +22018,7 @@
+ void
+ ix86_free_from_memory (enum machine_mode mode)
+ {
+-  if (!TARGET_RED_ZONE)
++  if (!TARGET_RED_ZONE || TARGET_64BIT_MS_ABI)
+     {
+       int size;
This page took 0.12229 seconds and 4 git commands to generate.