Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Rob McMahon
Sun, 25 Sep 1988 17:28
alter_reg assigns misaligned stack slots
Author: Rob McMahon
Date: Sun, 25 Sep 1988 17:28
Date: Sun, 25 Sep 1988 17:28
30 lines
1610 bytes
1610 bytes
GCC 1.28, Gould PN6000
When a pseudo-reg gets spilt to a stack slot, alter_reg now tries to re-use a
slot which was previously allocated to the same hard reg. If the mode was
different, though, this slot may have had an offset added by
assign_stack_local, which won't be appropriate for the current mode. The
result is a misaligned stack slot, and a core dump on big-endian machines that
care about alignment.
The offset could probably be adjusted, but I've just punted and stopped it
reusing a stack slot allocated to a different mode. Around line 1069 in
reload.c (alter_reg):
if (from_reg == -1)
x = assign_stack_local (GET_MODE (regno_reg_rtx[i]),
PSEUDO_REGNO_BYTES (i));
=> else if (spill_stack_slot[from_reg] != 0
=> && GET_MODE (regno_reg_rtx[i])
=> == GET_MODE (spill_stack_slot[from_reg]))
x = spill_stack_slot[from_reg];
else
spill_stack_slot[from_reg] = x
= assign_stack_local (GET_MODE (regno_reg_rtx[i]),
PSEUDO_REGNO_BYTES (i));
Rob
--
UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads