------- Comment #34 from jakub at gcc dot gnu dot org 2007-12-11 20:37 ------- Answers (note, I don't know PA at all either): 1) in a function that returns struct, %r28 is what targetm.calls.struct_value_rtx gives: /* Register in which address to store a structure value is passed to a function. */ #define PA_STRUCT_VALUE_REGNUM 28 static rtx pa_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED, int incoming ATTRIBUTE_UNUSED) { return gen_rtx_REG (Pmode, PA_STRUCT_VALUE_REGNUM); } 2) the instruction to load lo_sum of the address has not been dropped, I posted only part of the function's assembly. The bug is that dbr decides to put ldil LR'L$C0002,%r28 instruction from branch target (L$0026) into a delay slot even when %r28 is in fact live (passed from caller, unmodified to foo1) 3) I have tried Richard Sandiford's dbr patch immediately when I noticed this is dbr related, but it doesn't help.
I guess we need to ensure somehow that df knows struct_value_rtx regs are live at the beginning of function for functions that return struct. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32636