This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]