This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bad unwinder data for __kernel_sigtramp_rt64 in PPC 64 vDSO corrupts Condition Register
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- Cc: Alan Modra <amodra at au dot ibm dot com>, Benjamin Herrenschmuidt <benh at kernel dot crashing dot org>, gcc at gcc dot gnu dot org, Deepak Bhole <dbhole at redhat dot com>
- Date: Tue, 16 Oct 2007 20:21:55 +0200
- Subject: Re: Bad unwinder data for __kernel_sigtramp_rt64 in PPC 64 vDSO corrupts Condition Register
- References: <18196.61077.605560.598232@zebedee.pink>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Oct 16, 2007 at 06:02:13PM +0100, Andrew Haley wrote:
> The reason is that the unwinder data for CR in the vDSO is wrong. The
> line that affects the CR is here in
According to __builtin_init_dwarf_reg_size_table on ppc64-linux
r0..r31, fp0..fp31, mq, lr, ctr, ap, vrsave, vscr, spe_acc, spefcsr, sfp
are 64-bit, v0..v31 128-bit and cr0..cr7, xer 32-bit.
So both kernel and gcc/config/rs6000/linux-unwind.h are wrong.
> arch/powerpc/kernel/vdso64/sigtramp.S:
>
> rsave (70, 38*RSIZE) /* cr */
This should just be changed to
/* Size of CR regs in DWARF unwind info. */
#define CRSIZE 4
...
rsave (70, 38*RSIZE + (RSIZE - CRSIZE)) /* cr */
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;
Jakub