Commit efcc7037 by Jan Hubicka

i386.md (length_immediate): Do not refer to insn address.

	* i386.md (length_immediate): Do not refer to insn address.
	(jcc*, jmp patterns):  Compute length explicitly.

From-SVN: r59279
parent da98b11a
2002-11-19 Eric Botcazou <ebotcazou@libertysurf.fr> Tue Nov 19 23:50:56 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.md (length_immediate): Do not refer to insn address.
(jcc*, jmp patterns): Compute length explicitly.
2002-11-19 Eric Botcazou <ebotcazou@libertysurf.fr>
PR c/8588 PR c/8588
* optabs.c (expand_binop): Convert CONST_INTs in shift * optabs.c (expand_binop): Convert CONST_INTs in shift
......
...@@ -187,13 +187,10 @@ ...@@ -187,13 +187,10 @@
(if_then_else (match_operand 1 "constant_call_address_operand" "") (if_then_else (match_operand 1 "constant_call_address_operand" "")
(const_int 4) (const_int 4)
(const_int 0)) (const_int 0))
;; We don't know the size before shorten_branches. Expect
;; the instruction to fit for better scheduling.
(eq_attr "type" "ibr") (eq_attr "type" "ibr")
(if_then_else (and (ge (minus (match_dup 0) (pc)) (const_int 1)
(const_int -128))
(lt (minus (match_dup 0) (pc))
(const_int 124)))
(const_int 1)
(const_int 4))
] ]
(symbol_ref "/* Update immediate_length and other attributes! */ (symbol_ref "/* Update immediate_length and other attributes! */
abort(),1"))) abort(),1")))
...@@ -12840,13 +12837,13 @@ ...@@ -12840,13 +12837,13 @@
"%+j%C1\t%l0" "%+j%C1\t%l0"
[(set_attr "type" "ibr") [(set_attr "type" "ibr")
(set_attr "modrm" "0") (set_attr "modrm" "0")
(set (attr "prefix_0f") (set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc)) (if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -128)) (const_int -128))
(lt (minus (match_dup 0) (pc)) (lt (minus (match_dup 0) (pc))
(const_int 124))) (const_int 124)))
(const_int 0) (const_int 2)
(const_int 1)))]) (const_int 6)))])
(define_insn "*jcc_2" (define_insn "*jcc_2"
[(set (pc) [(set (pc)
...@@ -12858,13 +12855,13 @@ ...@@ -12858,13 +12855,13 @@
"%+j%c1\t%l0" "%+j%c1\t%l0"
[(set_attr "type" "ibr") [(set_attr "type" "ibr")
(set_attr "modrm" "0") (set_attr "modrm" "0")
(set (attr "prefix_0f") (set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc)) (if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -128)) (const_int -128))
(lt (minus (match_dup 0) (pc)) (lt (minus (match_dup 0) (pc))
(const_int 124))) (const_int 124)))
(const_int 0) (const_int 2)
(const_int 1)))]) (const_int 6)))])
;; In general it is not safe to assume too much about CCmode registers, ;; In general it is not safe to assume too much about CCmode registers,
;; so simplify-rtx stops when it sees a second one. Under certain ;; so simplify-rtx stops when it sees a second one. Under certain
...@@ -13125,6 +13122,13 @@ ...@@ -13125,6 +13122,13 @@
"" ""
"jmp\t%l0" "jmp\t%l0"
[(set_attr "type" "ibr") [(set_attr "type" "ibr")
(set (attr "length")
(if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -128))
(lt (minus (match_dup 0) (pc))
(const_int 124)))
(const_int 2)
(const_int 5)))
(set_attr "modrm" "0")]) (set_attr "modrm" "0")])
(define_expand "indirect_jump" (define_expand "indirect_jump"
...@@ -13251,14 +13255,9 @@ ...@@ -13251,14 +13255,9 @@
(const_int 124)))) (const_int 124))))
(const_int 2) (const_int 2)
(const_int 16))) (const_int 16)))
(set (attr "type") ;; We don't know the type before shorten branches. Optimistically expect
(if_then_else (and (eq_attr "alternative" "0") ;; the loop instruction to match.
(and (ge (minus (match_dup 0) (pc)) (set (attr "type") (const_string "ibr"))])
(const_int -128))
(lt (minus (match_dup 0) (pc))
(const_int 124))))
(const_string "ibr")
(const_string "multi")))])
(define_split (define_split
[(set (pc) [(set (pc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment