This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR middle-end/36450: ICE in insert_restore/insert_save with GET_MODE_ALIGNMENT
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: vmakarov at redhat dot com
- Date: Wed, 30 Jul 2008 14:57:23 -0700
- Subject: PATCH: PR middle-end/36450: ICE in insert_restore/insert_save with GET_MODE_ALIGNMENT
After revision 138335, we won't see ICE since x86 can align stack
properly. If we really want, we can check MAX_SUPPORTED_STACK_ALIGNMENT.
H.J.
---
2008-07-30 Vladimir Makarov <vmakarov@redhat.com>
H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/36450
* caller-save.c (insert_restore): Don't require alignment more
than MAX_SUPPORTED_STACK_ALIGNMENT in asserts.
(insert_save): Likewise.
--- gcc/caller-save.c.min 2008-07-30 12:29:42.000000000 -0700
+++ gcc/caller-save.c 2008-07-30 14:52:08.000000000 -0700
@@ -713,7 +713,8 @@ insert_restore (struct insn_chain *chain
/* 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));
+ gcc_assert (MIN (MAX_SUPPORTED_STACK_ALIGNMENT,
+ GET_MODE_ALIGNMENT (GET_MODE (mem))) <= MEM_ALIGN (mem));
pat = gen_rtx_SET (VOIDmode,
gen_rtx_REG (GET_MODE (mem),
@@ -790,7 +791,8 @@ insert_save (struct insn_chain *chain, i
/* 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));
+ gcc_assert (MIN (MAX_SUPPORTED_STACK_ALIGNMENT,
+ GET_MODE_ALIGNMENT (GET_MODE (mem))) <= MEM_ALIGN (mem));
pat = gen_rtx_SET (VOIDmode, mem,
gen_rtx_REG (GET_MODE (mem),