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)


>    /* Parse the LSDA header.  */
>    p = parse_lsda_header (context, language_specific_data, &info);
>  #ifdef HAVE_GETIPINFO
>    ip = _Unwind_GetIPInfo (context, &ip_before_insn);
>    if (! ip_before_insn)
>      --ip;
>  #else
>    ip = _Unwind_GetIP (context) - 1;
>  #endif
>    landing_pad = 0;
> 
> ...instead?

It could be, but it doesn't have to be.  Since ip_before_insn is set to
zero (in the declaration) and _Unwind_GetIP doesn't change it, then my
code will always subtract 1 from ip when using _Unwind_GetIP because
(! ip_before_insn) will always be true.  This code and my code are
functionally equivalent.

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]