diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-12-13 23:16:56 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-12-13 23:16:56 +0000 |
commit | b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd (patch) | |
tree | 6a7f304d8ee14fef74899d293496f9f886e83325 /gcc/config/sparc | |
parent | f4615940b171c449a0e799195dbd28041f677f35 (diff) | |
download | gcc-b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd.zip gcc-b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd.tar.gz gcc-b9f92c0bb7fc0c319b0a2d54b6a74e8f49c469bd.tar.bz2 |
re PR middle-end/78468 (libgomp.c/reduction-10.c and many more FAIL)
PR middle-end/78468
* emit-rtl.c (init_emit): Remove ??? comment.
* explow.c (get_dynamic_stack_size): Take known alignment of stack
pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
* config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
alignment of 3 virtual registers to BITS_PER_WORD.
* config/sparc/sparc.c (sparc_compute_frame_size): Simplify.
Co-Authored-By: Dominik Vogt <vogt@linux.vnet.ibm.com>
From-SVN: r255616
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/sparc.c | 6 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 24 |
2 files changed, 22 insertions, 8 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index a8d363c..890bde9 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -5483,10 +5483,8 @@ sparc_compute_frame_size (HOST_WIDE_INT size, int leaf_function) frame_size = apparent_frame_size = 0; else { - /* We subtract TARGET_STARTING_FRAME_OFFSET, remember it's negative. */ - apparent_frame_size - = ROUND_UP (size - targetm.starting_frame_offset (), 8); - apparent_frame_size += n_global_fp_regs * 4; + /* Start from the apparent frame size. */ + apparent_frame_size = ROUND_UP (size, 8) + n_global_fp_regs * 4; /* We need to add the size of the outgoing argument area. */ frame_size = apparent_frame_size + ROUND_UP (args_size, 8); diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index a0b5612..3d8e198 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -771,13 +771,29 @@ extern enum cmodel sparc_cmodel; /* The soft frame pointer does not have the stack bias applied. */ #define FRAME_POINTER_REGNUM 101 -/* Given the stack bias, the stack pointer isn't actually aligned. */ #define INIT_EXPANDERS \ do { \ - if (crtl->emit.regno_pointer_align && SPARC_STACK_BIAS) \ + if (crtl->emit.regno_pointer_align) \ { \ - REGNO_POINTER_ALIGN (STACK_POINTER_REGNUM) = BITS_PER_UNIT; \ - REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = BITS_PER_UNIT; \ + /* The biased stack pointer is only aligned on BITS_PER_UNIT. */\ + if (SPARC_STACK_BIAS) \ + { \ + REGNO_POINTER_ALIGN (STACK_POINTER_REGNUM) \ + = BITS_PER_UNIT; \ + REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) \ + = BITS_PER_UNIT; \ + } \ + \ + /* In 32-bit mode, not everything is double-word aligned. */ \ + if (TARGET_ARCH32) \ + { \ + REGNO_POINTER_ALIGN (VIRTUAL_INCOMING_ARGS_REGNUM) \ + = BITS_PER_WORD; \ + REGNO_POINTER_ALIGN (VIRTUAL_STACK_DYNAMIC_REGNUM) \ + = BITS_PER_WORD; \ + REGNO_POINTER_ALIGN (VIRTUAL_OUTGOING_ARGS_REGNUM) \ + = BITS_PER_WORD; \ + } \ } \ } while (0) |