Message ID | 53611380.4080901@mentor.com |
---|---|
State | New |
Headers | show |
On 04/30/14 09:15, Cesar Philippidis wrote: > I've been working on a patch to switch a few ppc targets to use softfp > in libgcc instead of fpbit and I noticed that ppc-none-eabispe fails to > bootstrap in both trunk and 4.9. The regression was introduced in > <http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03588.html>. Essentially, > the assert for a hard register in dwf_regno () is not valid on ppc spe > targets. In rs6000_dwarf_register_span (), there is a note stating: > > /* The duality of the SPE register size wreaks all kinds of havoc. > This is a way of distinguishing r0 in 32-bits from r0 in > 64-bits. */ > > and the function adds 1200 to regno, which makes that register appear to > be a pseudo. This causes problems in dwf_regno (), which asserts that > reg is a hard register. Since the dwarf2 pass is executed after register > allocation it should, in theory, be ok for the rs6000 backend to be > using a pseudo register for this application. > > Is this patch ok for trunk and 4.9? If so, please commit since I don't > have an svn account. It seems to me the real problem here is the SPE port and this silly game it plays with adding a large value to regno. While it is currently safe to remove the assert, the assert is there to help catch cases where a pseudo has leaked through to a point where it shouldn't. I'd rather look for another approach. Jeff
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 4180890..40ef0e2 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -906,7 +906,6 @@ notice_eh_throw (rtx insn) static inline unsigned dwf_regno (const_rtx reg) { - gcc_assert (REGNO (reg) < FIRST_PSEUDO_REGISTER); return DWARF_FRAME_REGNUM (REGNO (reg)); }