From: Maciej W. Rozycki Date: Tue, 18 Nov 2014 16:52:02 +0000 (+0000) Subject: mips.md (compression): Add `micromips32' setting. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d2d755e862d70f29ba26ad71c563de35ec230de;p=gcc.git 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. (*add3, sub3): Likewise. From-SVN: r217728 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c24cd1abd8..2fa58caeb38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-11-18 Maciej W. Rozycki + + * config/mips/mips.md (compression): Add `micromips32' setting. + (enabled, length): Handle it. + (shift_compression): Replace `micromips' with `micromips32' in + the `compression' attribute. + (*add3, sub3): Likewise. + 2014-11-18 Maciej W. Rozycki * gcc/config/mips/mips.md (*jump_absolute): Use a branch when in diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 6781a008806..65c0a3f18fe 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -429,7 +429,7 @@ (const_string "yes") (const_string "no"))) -(define_attr "compression" "none,all,micromips" +(define_attr "compression" "none,all,micromips32,micromips" (const_string "none")) (define_attr "enabled" "no,yes" @@ -440,7 +440,7 @@ || TARGET_O32_FP64A_ABI") (eq_attr "dword_mode" "yes")) (const_string "no") - (and (eq_attr "compression" "micromips") + (and (eq_attr "compression" "micromips32,micromips") (match_test "!TARGET_MICROMIPS")) (const_string "no")] (const_string "yes"))) @@ -526,7 +526,9 @@ ;; but there are special cases for branches (which must be handled here) ;; and for compressed single instructions. (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") (match_test "TARGET_MICROMIPS")) (const_int 2) @@ -979,8 +981,8 @@ (xor "xori") (and "andi")]) -(define_code_attr shift_compression [(ashift "micromips") - (lshiftrt "micromips") +(define_code_attr shift_compression [(ashift "micromips32") + (lshiftrt "micromips32") (ashiftrt "none")]) ;; is the c.cond.fmt condition associated with a particular code. @@ -1163,7 +1165,7 @@ return "addiu\t%0,%1,%2"; } [(set_attr "alu_type" "add") - (set_attr "compression" "micromips,*,micromips,micromips,micromips,micromips,*") + (set_attr "compression" "micromips32,*,micromips32,micromips32,micromips32,micromips32,*") (set_attr "mode" "")]) (define_insn "*add3_mips16" @@ -1381,7 +1383,7 @@ "" "subu\t%0,%1,%2" [(set_attr "alu_type" "sub") - (set_attr "compression" "micromips,*") + (set_attr "compression" "micromips32,*") (set_attr "mode" "")]) (define_insn "*subsi3_extended"