> The CIE says what the RA column is, but there is no initial value > location expression generated for the return address. That means > that on entry to a function, the CIE cannot be used to tell what > the return address is.
I'm not sure I understand. The RA column is the column in the table which represents the return address, so the return address is the value contained in that column on function entry. On SPARC, it's by convention the value contained in %o7 as far as the CFI are concerned. > The macro is INCOMING_RETURN_ADDR_RTX. But you explained in your previous message that it is not fully honored, didn't you? Instead, RETURN_ADDR_OFFSET is used by the unwinder through __builtin_extract_return_addr, see the code in unwind-dw2.c. > Other than the code which translates RTL to LocExpr not handling > REG+offset, I don't see a reason why REG+OFFSET is not valid, or why the > comment says that it is unnecessary. If the offset is small (1 jump instruction on SPARC), it doesn't really matter for unwinding. > On Sparc, it's only unnecessary because Sparc ignores the CIE. No, the GCC unwinder does make use of the CIE on SPARC, see extract_cie_info in unwind-dw2.c. -- Eric Botcazou