This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
New exception code
- To: rth at redhat dot com
- Subject: New exception code
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 07 May 2001 08:45:02 -0700
- Cc: gcc-patches at gcc dot gnu dot org
In *_mark_call_sites, we have code to walk back from the call looking
for argument setup.
The code uses CALL_INSN_FUNCTION_INFO to determine which registers to find
setup code for. However, CALL_INSN_FUNCTION_INFO may mention non-argument
registers (for example it may mention the PIC register as being used by the
call).
This minor tweak causes the code to ignore registers which are not used
for function arguments, but which are mentioned in CALL_INSN_FUNCTION_INFO.
This (in conjunction with other patches) have survived a bootstrap on the
PA (without it, the bootstrap will blow up badly). Installed into the
mainline sources.
* except.c (sjlj_mark_call_sites): Do not search for assignments to
non-argumment registers that are mentioned in CALL_INSN_FUNCTION_USAGE.
Index: except.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/except.c,v
retrieving revision 1.98
diff -c -3 -p -r1.98 except.c
*** except.c 2001/04/30 22:36:57 1.98
--- except.c 2001/05/07 15:40:40
*************** sjlj_mark_call_sites (lp_info)
*** 2068,2073 ****
--- 2068,2078 ----
if (REGNO (XEXP (XEXP (p, 0), 0)) >= FIRST_PSEUDO_REGISTER)
abort ();
+ /* We only care about registers which can hold function
+ arguments. */
+ if (! FUNCTION_ARG_REGNO_P (REGNO (XEXP (XEXP (p, 0), 0))))
+ continue;
+
SET_HARD_REG_BIT (parm_regs, REGNO (XEXP (XEXP (p, 0), 0)));
nparm_regs++;
}