diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-26 13:59:56 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-26 13:59:56 +0000 |
commit | ad33891d07550a1ada2ca3238a161e5e93319134 (patch) | |
tree | bb649ed6b0709e0e99f74f303514800816a201fe /gcc/caller-save.c | |
parent | a5c1d80245275834254284311f03d914768cc9a4 (diff) | |
download | gcc-ad33891d07550a1ada2ca3238a161e5e93319134.tar.gz |
2008-05-26 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/36253
* caller-save.c (insert_restore): Verify alignment of spill
space.
(insert_save): Likewise.
* cfgexpand.c (LOCAL_ALIGNMENT): Removed.
* defaults.h (LOCAL_ALIGNMENT): New. Provide default.
(STACK_SLOT_ALIGNMENT): Likewise.
* function.c (LOCAL_ALIGNMENT): Removed.
(get_stack_local_alignment): New.
(assign_stack_local): Use it. Set alignment on stack slot.
(assign_stack_temp_for_type): Use get_stack_local_alignment.
* config/i386/i386.h (LOCAL_ALIGNMENT): Updated.
(STACK_SLOT_ALIGNMENT): New.
* config/i386/i386.c (ix86_local_alignment): Handle caller-save
stack slot in XFmode.
* doc/tm.texi (STACK_SLOT_ALIGNMENT): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135927 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 7976fd5fd75..c6a685bde9c 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -704,6 +704,11 @@ insert_restore (struct insn_chain *chain, int before_p, int regno, mem = adjust_address (mem, save_mode[regno], 0); else mem = copy_rtx (mem); + + /* Verify that the alignment of spill space is equal to or greater + than required. */ + gcc_assert (GET_MODE_ALIGNMENT (GET_MODE (mem)) <= MEM_ALIGN (mem)); + pat = gen_rtx_SET (VOIDmode, gen_rtx_REG (GET_MODE (mem), regno), mem); @@ -776,6 +781,11 @@ insert_save (struct insn_chain *chain, int before_p, int regno, mem = adjust_address (mem, save_mode[regno], 0); else mem = copy_rtx (mem); + + /* Verify that the alignment of spill space is equal to or greater + than required. */ + gcc_assert (GET_MODE_ALIGNMENT (GET_MODE (mem)) <= MEM_ALIGN (mem)); + pat = gen_rtx_SET (VOIDmode, mem, gen_rtx_REG (GET_MODE (mem), regno)); |