|
Message
From: Robert Millan<rmh@a...>
Date: Thu Jun 30 12:08:33 CEST 2005
Subject: [openrisc] [patch] error in sigcontextinfo.h
On Thu, Jun 30, 2005 at 02:48:55AM +0200, Matjaz Breskvar wrote: > * Robert Millan (rmh@a...) wrote: > > On Fri, Jun 24, 2005 at 02:05:18PM +0200, Matjaz Breskvar wrote: > > > Thank you for the report, i'll take a look at it ... > > > > Uhm.. I found that my patch is wrong. I discovered later that (ctx) is a > > pointer to struct so the -> is fine. Please excuse me for being so quick at > > sending a patch before verifying it works. > > > > The register names, however, are from powerpc and don't match or32 ones AFAIK. > > > > Shouldn't these be "pc" and "gprs" instead of "nip" and "gpr" ? > > looking at it, i would think 'pc', 'sp' and 'sp'. do you agree ?
No idea :)
I barely know OR32 asm, but don't know PowerPC asm at all. "nip" sounds a lot like the instruction pointer, but "gpr" sounds more like general purpose register. Doesn't PowerPC have a stack pointer register?
> > > > According to <asm/sigcontext.h>, the "regs" component of sigcontext struct is > > > > not a pointer to pr_regs like on other arches, but a pt_regs struct itself. > > > > > > > > So unless I'm missing something the following lines in uClibc need fixing: > > > > > > > > Index: ./sysdeps/linux/or32/bits/sigcontextinfo.h > > > > =================================================================== > > > > RCS file: /home/oc/cvs/or1k/linux/uClibc/libc/sysdeps/linux/or32/bits/sigcontextinfo.h,v > > > > retrieving revision 1.1.1.1 > > > > diff -u -r1.1.1.1 sigcontextinfo.h > > > > --- ./sysdeps/linux/or32/bits/sigcontextinfo.h 12 Nov 2004 23:09:04 -0000 1.1.1.1 > > > > +++ ./sysdeps/linux/or32/bits/sigcontextinfo.h 24 Jun 2005 10:31:55 -0000 > > > > @@ -20,8 +20,8 @@ > > > > > > > > #define SIGCONTEXT struct sigcontext * > > > > #define SIGCONTEXT_EXTRA_ARGS > > > > -#define GET_PC(ctx) ((void *)((ctx)->regs->nip)) > > > > -#define GET_FRAME(ctx) (*(void **)((ctx)->regs->gpr[1])) > > > > -#define GET_STACK(ctx) ((void *)((ctx)->regs->gpr[1])) > > > > +#define GET_PC(ctx) ((void *)((ctx).regs->nip)) > > > > +#define GET_FRAME(ctx) (*(void **)((ctx).regs->gpr[1])) > > > > +#define GET_STACK(ctx) ((void *)((ctx).regs->gpr[1])) > > > > #define CALL_SIGHANDLER(handler, signo, ctx) \ > > > > (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
-- Robert Millan
|
 |