https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org

--- Comment #25 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
(In reply to Ilya Enkovich from comment #21)
> (In reply to Jeffrey A. Law from comment #20)
> > Ilya, it's the function call in this code I think:
> > 
> >   (cond [(eq_attr "length_nobnd" "!0")
> >            (plus (symbol_ref ("ix86_bnd_prefixed_insn_p (insn)"))
> >                  (attr "length_nobnd"))
> > 
> > You're calling out to ix86_bnd_prefixed_insn_p, and that's problematical for
> > branch shortening if I'm understanding Joern's comments here and David's
> > comments in the PA port correctly.
> 
> Then we have three problematic patterns and the easiest way to handle it is
> to get rid of ix86_bnd_prefixed_insn_p call in length computation for them. 
> I think the easiest way to do it is to have separate bnd and nobnd patterns
> for these instructions.  Attached patch helps me to resolve valgrind error. 
> Is such approach fine?

If all you want to do is add 1 byte to the length to account for a prefix
then it might be cleaner to use ADJUST_INSN_LENGTH.  You could then keep
the single nobnd patterns.

Reply via email to