Saturday, December 6, 2014

It took a bit, but I got the compiler to emit some information

From unwind-dw2-fde.c.164r.subreg2:
(insn 41 40 213 7 ../../../libgcc/../gcc/unwind-dw2-fde.c:612 (set (reg:QI 22 [ prephitmp.500 ])
        (subreg:QI (reg/v:HI 27 [ encoding ]) 1)) 73 {movqi} (nil))
From unwind-dw2-fde.c.172r.ira:
Reloads for insn # 41
Reload 0: reload_in (QI) = (subreg:QI (reg/v:HI 27 [ encoding ]) 1)
        ALL_REGS, RELOAD_FOR_INPUT (opnum = 1)
        reload_in_reg: (subreg:QI (reg/v:HI 27 [ encoding ]) 1)
        reload_reg_rtx: (reg:QI 14 r14 [orig:22 prephitmp.500 ] [22])

(insn 229 40 238 7 ../../../libgcc/../gcc/unwind-dw2-fde.c:612 (set:QI (reg:QI 27)
        (subreg:QI (reg:HI 27) 1)) 73 {movqi} (nil))
../../../libgcc/../gcc/unwind-dw2-fde.c: In function ‘classify_object_over_fdes’:
../../../libgcc/../gcc/unwind-dw2-fde.c:645: internal compiler error: in reload_cse_simplify_operands, at postreload.c:396
Please submit a full bug report,

It looks like the problem is that the instruction is trying to validate R27 for use in strict mode. Since R27 is not a real register, the instruction fails. The instruction needs to be transformed to use a memory address. I'm not quite sure how to do this and why it's not being done now. My guess is that the changes I did to handle subregs is causing something else to break.

I checked the usage of R27, and there's no wierd dependancy forcing it to stay in a register. Hmm. More research is required here.

No comments:

Post a Comment