This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC]: MD_FALLBACK_FRAME_STATE_FOR macro for darwin PPC


Andreas Tobler wrote:

+ new_cfa_ = mc_->ss.r1; \
+ (FS)->cfa_how = CFA_REG_OFFSET; \
+ (FS)->cfa_reg = STACK_POINTER_REGNUM; \
+ (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \
+ \
+ /* r0 to r31 are variable names in the ppc_thread_state struct \
+ since we need the address we just increment the r0 by i_ * 4 \
+ to get the other vars addresses. */ \
+ \
+ for (i_ = 0; i_ < 32; i_++) { \
+ if (i_ != STACK_POINTER_REGNUM) \
+ { \
+ (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[i_].loc.offset \
+ = (long)&(mc_->ss.r0) + (i_*4) - new_cfa_; \
+ } \
+ } \
+ \
+ (FS)->regs.reg[LINK_REGISTER_REGNUM].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \
+ = (long)&(mc_->ss.lr) - new_cfa_; \
+ \
+ (FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[CR0_REGNO].loc.offset \
+ = (long)&(mc_->ss.srr0) - new_cfa_; \
+ (FS)->retaddr_column = CR0_REGNO; \
+ goto SUCCESS; \
+ } while (0)


I know next to nothing about PPC ABIs, but are any of these floating point registers?

Are there any call saved FP registers in this ABI? and if so are you restoring them. Although I don't think that the unwinder uses floating point, it seems that restoring call saved FP registers is a good idea if you are not already doing it.

Just my $0.02

David Daney.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]