This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for PR target/27880 (Use of _Unwind_GetIPInfo)
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: howarth at bromo dot msbb dot uc dot edu
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 6 Oct 2006 15:59:45 -0700 (PDT)
- Subject: Re: Patch for PR target/27880 (Use of _Unwind_GetIPInfo)
> Steve,
> Are you sure? It looks to me like ip gets deincremented one
> extra time in your version compared to the original code when
> _Unwind_GetIP is used.
> Jack
I am sure.
| +#ifdef HAVE_GETIPINFO
| ip = _Unwind_GetIPInfo (context, &ip_before_insn);
| +#else
| + ip = _Unwind_GetIP (context);
| +#endif
| if (! ip_before_insn)
| --ip;
| landing_pad = 0;
When using _Unwind_GetIP, ip always gets decremented once. There is no
'- 1' after the call to _Unwind_GetIP. If I changed:
ip = _Unwind_GetIP (context);
to
ip = _Unwind_GetIP (context) - 1;
then I would need to move the if statement up into the HAVE_GETIPINFO part
of the ifdef to avoid an extra decrement.
Steve Ellcey
sje@cup.hp.com