summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-15 15:01:57 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-15 15:01:57 +0000
commit86a58d7f49baf072530d96dd6b48a0b4f6bca911 (patch)
tree28780414aa6eae96bfb134b18a3bee72b9b7ff88 /gcc/reload1.c
parentb828b315689edb38104fd4e0d938b8736f871194 (diff)
downloadgcc-86a58d7f49baf072530d96dd6b48a0b4f6bca911.tar.gz
2008-09-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r140370 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@140372 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 1ea41091260..93457c162c0 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2176,18 +2176,28 @@ alter_reg (int i, int from_reg, bool dont_share_p)
inherent space, and no less total space, then the previous slot. */
else if (from_reg == -1 || (! dont_share_p && flag_ira && optimize))
{
+ rtx stack_slot;
alias_set_type alias_set = new_alias_set ();
/* No known place to spill from => no slot to reuse. */
x = assign_stack_local (mode, total_size,
min_align > inherent_align
|| total_size > inherent_size ? -1 : 0);
+
+ stack_slot = x;
+
if (BYTES_BIG_ENDIAN)
/* Cancel the big-endian correction done in assign_stack_local.
Get the address of the beginning of the slot.
This is so we can do a big-endian correction unconditionally
below. */
adjust = inherent_size - total_size;
+ if (adjust)
+ stack_slot
+ = adjust_address_nv (x, mode_for_size (total_size
+ * BITS_PER_UNIT,
+ MODE_INT, 1),
+ adjust);
/* Nothing can alias this slot except this pseudo. */
set_mem_alias_set (x, alias_set);
@@ -2195,7 +2205,7 @@ alter_reg (int i, int from_reg, bool dont_share_p)
if (! dont_share_p && flag_ira && optimize)
/* Inform IRA about allocation a new stack slot. */
- ira_mark_new_stack_slot (x, i, total_size);
+ ira_mark_new_stack_slot (stack_slot, i, total_size);
}
/* Reuse a stack slot if possible. */