Commit 00bb4b62 by Gavin Koch Committed by Gavin Romig-Koch

mips.md (trucndihi2,truncdiqi2): Change these to support mips16.

	* mips.md (trucndihi2,truncdiqi2): Change these to support
	mips16.

From-SVN: r17868
parent 3871c609
Thu Feb 12 14:04:09 1998 Gavin Koch <gavin@cygnus.com>
* mips.md (trucndihi2,truncdiqi2): Change these to support
mips16.
Thu Feb 12 11:34:55 1998 Gavin Koch <gavin@cygnus.com> Thu Feb 12 11:34:55 1998 Gavin Koch <gavin@cygnus.com>
* mips/mips.c (movdi_operand): Direct referances to symbols * mips/mips.c (movdi_operand): Direct referances to symbols
......
...@@ -3188,20 +3188,33 @@ move\\t%0,%z4\\n\\ ...@@ -3188,20 +3188,33 @@ move\\t%0,%z4\\n\\
(define_insn "truncdihi2" (define_insn "truncdihi2"
[(set (match_operand:HI 0 "register_operand" "=d") [(set (match_operand:HI 0 "register_operand" "=d")
(truncate:HI (match_operand:DI 1 "se_register_operand" "d")))] (truncate:HI (match_operand:DI 1 "se_register_operand" "d")))]
"TARGET_64BIT && !TARGET_MIPS16" "TARGET_64BIT"
"andi\\t%0,%1,0xffff" "*
{
if (TARGET_MIPS16)
return \"dsll\\t%0,%1,48\;dsra\\t%0,48\";
return \"andi\\t%0,%1,0xffff\";
}"
[(set_attr "type" "darith") [(set_attr "type" "darith")
(set_attr "mode" "HI") (set_attr "mode" "HI")
(set_attr "length" "1")]) (set (attr "length") (if_then_else (eq (symbol_ref "mips16") (const_int 0))
(const_int 1)
(const_int 4)))])
(define_insn "truncdiqi2" (define_insn "truncdiqi2"
[(set (match_operand:QI 0 "register_operand" "=d") [(set (match_operand:QI 0 "register_operand" "=d")
(truncate:QI (match_operand:DI 1 "se_register_operand" "d")))] (truncate:QI (match_operand:DI 1 "se_register_operand" "d")))]
"TARGET_64BIT && !TARGET_MIPS16" "TARGET_64BIT"
"andi\\t%0,%1,0x00ff" "*
{
if (TARGET_MIPS16)
return \"dsll\\t%0,%1,56\;dsra\\t%0,56\";
return \"andi\\t%0,%1,0x00ff\";
}"
[(set_attr "type" "darith") [(set_attr "type" "darith")
(set_attr "mode" "QI") (set_attr "mode" "QI")
(set_attr "length" "1")]) (set (attr "length") (if_then_else (eq (symbol_ref "mips16") (const_int 0))
(const_int 1)
(const_int 4)))])
;; Combiner patterns to optimize shift/truncate combinations. ;; Combiner patterns to optimize shift/truncate combinations.
(define_insn "" (define_insn ""
......
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