aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-08-04 14:56:12 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2008-08-04 07:56:12 -0700
commit6fc3c2b2c42c5d5a177867aa5390f054d7d8a8a8 (patch)
tree681464b21d3a0c9c4d31e17395f380c1e9df5b86 /gcc
parenta07c35938a54e38a3e04d827c2cbf8c3e1b97a9a (diff)
downloadgcc-6fc3c2b2c42c5d5a177867aa5390f054d7d8a8a8.zip
gcc-6fc3c2b2c42c5d5a177867aa5390f054d7d8a8a8.tar.gz
gcc-6fc3c2b2c42c5d5a177867aa5390f054d7d8a8a8.tar.bz2
re PR c++/37012 (numerous stackalign related testsuite failures on i686-apple-darwin9)
2008-08-04 H.J. Lu <hongjiu.lu@intel.com> PR target/37012 * config/i386/i386.c (ix86_expand_prologue): Use UNITS_PER_WORD instead of STACK_BOUNDARY / BITS_PER_UNIT to align stack. (ix86_expand_epilogue): Likewise. From-SVN: r138631
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c14
2 files changed, 13 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2c30ecf..9483e53 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2008-08-04 H.J. Lu <hongjiu.lu@intel.com>
+ PR target/37012
+ * config/i386/i386.c (ix86_expand_prologue): Use UNITS_PER_WORD
+ instead of STACK_BOUNDARY / BITS_PER_UNIT to align stack.
+ (ix86_expand_epilogue): Likewise.
+
+2008-08-04 H.J. Lu <hongjiu.lu@intel.com>
+
* config/i386/i386.c (ix86_compute_frame_layout): Fix a typo
in comments.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index aed74be..d31f176 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7656,14 +7656,13 @@ ix86_expand_prologue (void)
rtx x, y;
int align_bytes = crtl->stack_alignment_needed / BITS_PER_UNIT;
int param_ptr_offset = (call_used_regs[REGNO (crtl->drap_reg)]
- ? 0 : STACK_BOUNDARY / BITS_PER_UNIT);
+ ? 0 : UNITS_PER_WORD);
gcc_assert (stack_realign_drap);
/* Grab the argument pointer. */
x = plus_constant (stack_pointer_rtx,
- (STACK_BOUNDARY / BITS_PER_UNIT
- + param_ptr_offset));
+ (UNITS_PER_WORD + param_ptr_offset));
y = crtl->drap_reg;
/* Only need to push parameter pointer reg if it is caller
@@ -7690,8 +7689,7 @@ ix86_expand_prologue (void)
expand_builtin_return_addr etc. */
x = crtl->drap_reg;
x = gen_frame_mem (Pmode,
- plus_constant (x,
- -(STACK_BOUNDARY / BITS_PER_UNIT)));
+ plus_constant (x, -UNITS_PER_WORD));
insn = emit_insn (gen_push (x));
RTX_FRAME_RELATED_P (insn) = 1;
}
@@ -7855,7 +7853,7 @@ ix86_expand_prologue (void)
/* vDRAP is setup but after reload it turns out stack realign
isn't necessary, here we will emit prologue to setup DRAP
without stack realign adjustment */
- int drap_bp_offset = STACK_BOUNDARY / BITS_PER_UNIT * 2;
+ int drap_bp_offset = UNITS_PER_WORD * 2;
rtx x = plus_constant (hard_frame_pointer_rtx, drap_bp_offset);
insn = emit_insn (gen_rtx_SET (VOIDmode, crtl->drap_reg, x));
}
@@ -8054,11 +8052,11 @@ ix86_expand_epilogue (int style)
if (crtl->drap_reg && crtl->stack_realign_needed)
{
int param_ptr_offset = (call_used_regs[REGNO (crtl->drap_reg)]
- ? 0 : STACK_BOUNDARY / BITS_PER_UNIT);
+ ? 0 : UNITS_PER_WORD);
gcc_assert (stack_realign_drap);
emit_insn ((*ix86_gen_add3) (stack_pointer_rtx,
crtl->drap_reg,
- GEN_INT (-(STACK_BOUNDARY / BITS_PER_UNIT
+ GEN_INT (-(UNITS_PER_WORD
+ param_ptr_offset))));
if (!call_used_regs[REGNO (crtl->drap_reg)])
emit_insn ((*ix86_gen_pop1) (crtl->drap_reg));