This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix reg-stack sanity check
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, aj at suse dot de
- Date: Thu, 7 Nov 2002 11:21:34 +0100
- Subject: Fix reg-stack sanity check
Hi,
on x86-64 we die when compiling ada runtime on function returning
complex long double and trapping at same time
Thu Nov 7 11:18:01 CET 2002 Jan Hubicka <jh@suse.cz>
* reg-stack.c (compensate_edge): Fix sanity check.
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reg-stack.c,v
retrieving revision 1.116
diff -c -3 -p -r1.116 reg-stack.c
*** reg-stack.c 27 Oct 2002 14:47:54 -0000 1.116
--- reg-stack.c 7 Nov 2002 10:17:43 -0000
*************** compensate_edge (e, file)
*** 2553,2559 ****
--- 2553,2563 ----
abort ();
eh1:
+ /* We are sure that there is st(0) live, otherwise we won't compensate.
+ For complex return values, we may have st(1) live as well. */
SET_HARD_REG_BIT (tmp, FIRST_STACK_REG);
+ if (TEST_HARD_REG_BIT (regstack.reg_set, FIRST_STACK_REG + 1))
+ SET_HARD_REG_BIT (tmp, FIRST_STACK_REG + 1);
GO_IF_HARD_REG_EQUAL (regstack.reg_set, tmp, eh2);
abort ();
eh2: