Commit 5d2d755e by Maciej W. Rozycki Committed by Maciej W. Rozycki

mips.md (compression): Add `micromips32' setting.

	* config/mips/mips.md (compression): Add `micromips32' setting.
	(enabled, length): Handle it.
	(shift_compression): Replace `micromips' with `micromips32' in
	the `compression' attribute.
	(*add<mode>3, sub<mode>3): Likewise.

From-SVN: r217728
parent 73af680e
2014-11-18 Maciej W. Rozycki <macro@codesourcery.com> 2014-11-18 Maciej W. Rozycki <macro@codesourcery.com>
* config/mips/mips.md (compression): Add `micromips32' setting.
(enabled, length): Handle it.
(shift_compression): Replace `micromips' with `micromips32' in
the `compression' attribute.
(*add<mode>3, sub<mode>3): Likewise.
2014-11-18 Maciej W. Rozycki <macro@codesourcery.com>
* gcc/config/mips/mips.md (*jump_absolute): Use a branch when in * gcc/config/mips/mips.md (*jump_absolute): Use a branch when in
range, a jump otherwise. range, a jump otherwise.
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
(const_string "yes") (const_string "yes")
(const_string "no"))) (const_string "no")))
(define_attr "compression" "none,all,micromips" (define_attr "compression" "none,all,micromips32,micromips"
(const_string "none")) (const_string "none"))
(define_attr "enabled" "no,yes" (define_attr "enabled" "no,yes"
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
|| TARGET_O32_FP64A_ABI") || TARGET_O32_FP64A_ABI")
(eq_attr "dword_mode" "yes")) (eq_attr "dword_mode" "yes"))
(const_string "no") (const_string "no")
(and (eq_attr "compression" "micromips") (and (eq_attr "compression" "micromips32,micromips")
(match_test "!TARGET_MICROMIPS")) (match_test "!TARGET_MICROMIPS"))
(const_string "no")] (const_string "no")]
(const_string "yes"))) (const_string "yes")))
...@@ -526,7 +526,9 @@ ...@@ -526,7 +526,9 @@
;; but there are special cases for branches (which must be handled here) ;; but there are special cases for branches (which must be handled here)
;; and for compressed single instructions. ;; and for compressed single instructions.
(define_attr "length" "" (define_attr "length" ""
(cond [(and (eq_attr "compression" "micromips,all") (cond [(and (ior (eq_attr "compression" "micromips,all")
(and (eq_attr "compression" "micromips32")
(eq_attr "mode" "SI,SF")))
(eq_attr "dword_mode" "no") (eq_attr "dword_mode" "no")
(match_test "TARGET_MICROMIPS")) (match_test "TARGET_MICROMIPS"))
(const_int 2) (const_int 2)
...@@ -979,8 +981,8 @@ ...@@ -979,8 +981,8 @@
(xor "xori") (xor "xori")
(and "andi")]) (and "andi")])
(define_code_attr shift_compression [(ashift "micromips") (define_code_attr shift_compression [(ashift "micromips32")
(lshiftrt "micromips") (lshiftrt "micromips32")
(ashiftrt "none")]) (ashiftrt "none")])
;; <fcond> is the c.cond.fmt condition associated with a particular code. ;; <fcond> is the c.cond.fmt condition associated with a particular code.
...@@ -1163,7 +1165,7 @@ ...@@ -1163,7 +1165,7 @@
return "<d>addiu\t%0,%1,%2"; return "<d>addiu\t%0,%1,%2";
} }
[(set_attr "alu_type" "add") [(set_attr "alu_type" "add")
(set_attr "compression" "micromips,*,micromips,micromips,micromips,micromips,*") (set_attr "compression" "micromips32,*,micromips32,micromips32,micromips32,micromips32,*")
(set_attr "mode" "<MODE>")]) (set_attr "mode" "<MODE>")])
(define_insn "*add<mode>3_mips16" (define_insn "*add<mode>3_mips16"
...@@ -1381,7 +1383,7 @@ ...@@ -1381,7 +1383,7 @@
"" ""
"<d>subu\t%0,%1,%2" "<d>subu\t%0,%1,%2"
[(set_attr "alu_type" "sub") [(set_attr "alu_type" "sub")
(set_attr "compression" "micromips,*") (set_attr "compression" "micromips32,*")
(set_attr "mode" "<MODE>")]) (set_attr "mode" "<MODE>")])
(define_insn "*subsi3_extended" (define_insn "*subsi3_extended"
......
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