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. Cesar
2014-04-30 Cesar Philippidis <ce...@codesourcery.com> gcc/ * dwarf2cfi.c (dwf_regno): Don't assert reg is a pseudo register. 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)); }