Jakub Jelinek writes: > On Tue, Oct 16, 2007 at 07:22:31PM +0100, Andrew Haley wrote: > > > and similarly linux-unwind.h should do: > > > > > > fs->regs.reg[R_CR2].loc.offset = (long) ®s->ccr - new_cfa; > > > /* CR? regs are just 32-bit and PPC is big-endian. */ > > > fs->regs.reg[R_CR2].loc.offset += sizeof (long) - 4; > > > > Won't this generate an alignment fault? > > Why? The reg size is 32-bit, so it only should be read/written > as 32-bit value. > E.g. a brief look at _Unwind_RaiseException shows: > lwz 12,5656(1) > ... > mtcrf 32,12 #, > ld 15,5368(1) #, > ld 16,5376(1) #, > mtcrf 16,12 #, > ld 17,5384(1) #, > ld 18,5392(1) #, > mtcrf 8,12 #, > so it shouldn't have any problems with 4 byte alignment (rather than 8 byte > alignment).
Yes, I think it's OK. I was thinking about uw_install_context_1, but that should be fine, as it uses memcpy. Andrew.