aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2014-12-05 16:00:52 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2014-12-05 16:00:52 +0000
commit65fdb418d1c0211451609a5b012ac7cddfcad471 (patch)
tree3bc8c3e90a2a454c95a1a95f8d701c2402e662a2
parent3edaf26de0dd7a7475646809d1e2841be665a59c (diff)
downloadgcc-65fdb418d1c0211451609a5b012ac7cddfcad471.zip
gcc-65fdb418d1c0211451609a5b012ac7cddfcad471.tar.gz
gcc-65fdb418d1c0211451609a5b012ac7cddfcad471.tar.bz2
re PR target/64003 (valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md)
PR target/64003 * config/i386/i386.md (*jcc_1_bnd): New. (*jcc_2_bnd): New. (jump_bnd): New. (*jcc_1): Remove bnd prefix. (*jcc_2): Likewise. (jump): Likewise. From-SVN: r218426
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.md63
2 files changed, 67 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a8f92da..2b81193 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2014-12-05 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ PR target/64003
+ * config/i386/i386.md (*jcc_1_bnd): New.
+ (*jcc_2_bnd): New.
+ (jump_bnd): New.
+ (*jcc_1): Remove bnd prefix.
+ (*jcc_2): Likewise.
+ (jump): Likewise.
+
2014-12-05 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
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)))])
+
(define_insn "*jcc_1"
[(set (pc)
(if_then_else (match_operator 1 "ix86_comparison_operator"
@@ -10965,10 +10983,10 @@
(label_ref (match_operand 0))
(pc)))]
""
- "%!%+j%C1\t%l0"
+ "%+j%C1\t%l0"
[(set_attr "type" "ibr")
(set_attr "modrm" "0")
- (set (attr "length_nobnd")
+ (set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -126))
(lt (minus (match_dup 0) (pc))
@@ -10976,6 +10994,24 @@
(const_int 2)
(const_int 6)))])
+(define_insn "*jcc_2_bnd"
+ [(set (pc)
+ (if_then_else (match_operator 1 "ix86_comparison_operator"
+ [(reg FLAGS_REG) (const_int 0)])
+ (pc)
+ (label_ref (match_operand 0))))]
+ "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)))])
+
(define_insn "*jcc_2"
[(set (pc)
(if_then_else (match_operator 1 "ix86_comparison_operator"
@@ -10983,10 +11019,10 @@
(pc)
(label_ref (match_operand 0))))]
""
- "%!%+j%c1\t%l0"
+ "%+j%c1\t%l0"
[(set_attr "type" "ibr")
(set_attr "modrm" "0")
- (set (attr "length_nobnd")
+ (set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -126))
(lt (minus (match_dup 0) (pc))
@@ -11420,13 +11456,28 @@
;; Unconditional and other jump instructions
+(define_insn "jump_bnd"
+ [(set (pc)
+ (label_ref (match_operand 0)))]
+ "TARGET_MPX && ix86_bnd_prefixed_insn_p (insn)"
+ "bnd jmp\t%l0"
+ [(set_attr "type" "ibr")
+ (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 6)))
+ (set_attr "modrm" "0")])
+
(define_insn "jump"
[(set (pc)
(label_ref (match_operand 0)))]
""
- "%!jmp\t%l0"
+ "jmp\t%l0"
[(set_attr "type" "ibr")
- (set (attr "length_nobnd")
+ (set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -126))
(lt (minus (match_dup 0) (pc))