Ilya Enkovich <enkovich....@gmail.com> writes: > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md > index 88435d6..9019ed8 100644 > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -10958,6 +10958,24 @@ > ;; Basic conditional jump instructions. > ;; We ignore the overflow flag for signed branch instructions. > > +(define_insn "*jcc_1_bnd" > + [(set (pc) > + (if_then_else (match_operator 1 "ix86_comparison_operator" > + [(reg FLAGS_REG) (const_int 0)]) > + (label_ref (match_operand 0)) > + (pc)))] > + "TARGET_MPX && ix86_bnd_prefixed_insn_p (insn)" > + "bnd %+j%C1\t%l0" > + [(set_attr "type" "ibr") > + (set_attr "modrm" "0") > + (set (attr "length") > + (if_then_else (and (ge (minus (match_dup 0) (pc)) > + (const_int -126)) > + (lt (minus (match_dup 0) (pc)) > + (const_int 128))) > + (const_int 3) > + (const_int 7)))]) > +
Sorry, looking at this again, shouldn't the offset be -125 rather than -126? The pc in: (ge (minus (match_dup 0) (pc)) (const_int -126)) is the start of the instruction, so we need to add the length of the jump itself to the real minimum range of -128. Thanks, Richard