LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Matjaz Breskvar<phoenix@o...>
    Date: Thu Jun 30 02:48:55 CEST 2005
    Subject: [openrisc] [patch] error in sigcontextinfo.h
    Top
    * 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 ?

    regards,
    p.

    > > > 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))

    ReferenceAuthor
    [openrisc] [patch] error in sigcontextinfo.hRobert Millan

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.