diff options
Diffstat (limited to 'gcc/config/sparc/sparc.h')
-rw-r--r-- | gcc/config/sparc/sparc.h | 24 |
1 files changed, 20 insertions, 4 deletions
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) |