]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport a few h8300 fixes to 2.95
authorBernd Schmidt <bernds@redhat.co.uk>
Fri, 29 Dec 2000 16:04:18 +0000 (16:04 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 29 Dec 2000 16:04:18 +0000 (16:04 +0000)
From-SVN: r38540

gcc/ChangeLog
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.md

index c990d82b9b6ed163b48abe8f90900e1609ba7d34..0f6b231c73ec3afa21ed5fe1639907fbac78fbb0 100644 (file)
@@ -6,6 +6,19 @@
        * config/sparc/sparc.c (pic_address_needs_scratch): LABEL_REFs are
        not valid pic operands.
 
+       2000-12-26  Kazu Hirata  <kazu@hxi.com>
+       * config/h8300/h8300.c (get_shift_alg): Fix a typo in the
+       assembly code for 12-bit ASHIFTRT in HImode.
+
+       2000-07-17  Kazu Hirata  <kazu@hxi.com>
+       * h8300.md: Fix the format of mac.
+       (movsi_h8300hs): Output a tab after stmac instead of a space.
+
+       2000-10-07  Will Cohen  <wcohen@redhat.com>, Kazu Hirata  <kazu@hxi.com>
+       * config/h8300/h8300.md: Remove the memory alternative and correct
+       the insn lengths in the templates for sign extention and zero
+       extention.
+
 2000-12-22  Bernd Schmidt  <bernds@redhat.co.uk>
 
        * calls.c (emit_call_1): Fall back to call_pop/call_value_pop if no
index a10486f7449f3063d284910ea3bad362c0dca581..b48a68bbc549e33829a5aaa98411684fb89521ca 100644 (file)
@@ -2313,9 +2313,9 @@ get_shift_alg (cpu, shift_type, mode, count, assembler_p,
              if (TARGET_H8300)
                *assembler_p = "mov.b\t%t0,%s0\n\tbld\t#7,%s0\n\tsubx\t%t0,%t0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0";
              else if (TARGET_H8300H)
-               *assembler_p = "mov.b\t%t0,%s0\n\textw.w\t%T0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0";
+               *assembler_p = "mov.b\t%t0,%s0\n\texts.w\t%T0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0\n\tshar.b\t%s0";
              else if (TARGET_H8300S)
-               *assembler_p = "mov.b\t%t0,%s0\n\textw.w\t%T0\n\tshar.b\t#2,%s0\n\tshar.b\t#2,%s0";
+               *assembler_p = "mov.b\t%t0,%s0\n\texts.w\t%T0\n\tshar.b\t#2,%s0\n\tshar.b\t#2,%s0";
              *cc_valid_p = 0;
              return SHIFT_SPECIAL;
            }
index da6519300e983974c73ac3a5b62fd67ec4f8b981..016a524d29e078d45f6b69528e438cbdc125c838 100644 (file)
   if (which_alternative == 7)
     return \"clrmac\;ldmac %1,macl\";
   if (which_alternative == 8)
-    return \"stmac macl,%0\";
+    return \"stmac     macl,%0\";
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       int val = INTVAL (operands[1]);
          (sign_extend:SI
            (mem:HI (post_inc:SI (match_operand:SI 2 "register_operand" "r"))))))]
   "TARGET_H8300S"
-  "clrmac\;mac %2,%1"
+  "clrmac\;mac @%2+,@%1+"
   [(set_attr "length" "6")
    (set_attr "cc" "none_0hit")])
 
            (post_inc:SI (match_operand:SI 2 "register_operand" "r")))))
              (match_operand:SI 3 "register_operand" "0")))]
   "TARGET_H8300S"
-  "mac %2,%1"
+  "mac @%2+,@%1+"
   [(set_attr "length" "4")
    (set_attr "cc" "none_0hit")])
 
 
 (define_expand "zero_extendhisi2"
   [(set (match_operand:SI 0 "register_operand" "")
-       (zero_extend:SI (match_operand:HI 1 "general_operand" "")))]
+       (zero_extend:SI (match_operand:HI 1 "register_operand" "")))]
   ""
   "
 {
    (set_attr "cc" "clobber,clobber,clobber")])
 
 (define_insn ""
-  [(set (match_operand:SI 0 "register_operand" "=r,r")
-       (zero_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))]
+  [(set (match_operand:SI 0 "register_operand" "=r")
+       (zero_extend:SI (match_operand:HI 1 "register_operand" "0")))]
   "TARGET_H8300H || TARGET_H8300S"
-  "@
-  extu.l       %S0
-  mov.w        %T1,%T0\;extu.l %S0"
-  [(set_attr "length" "2,4")
-   (set_attr "cc" "set_znv,set_znv")])
+  "extu.l      %S0"
+  [(set_attr "length" "2")
+   (set_attr "cc" "set_znv")])
 
 (define_expand "extendqihi2"
   [(set (match_operand:HI 0 "register_operand" "")
-       (sign_extend:HI (match_operand:QI 1 "general_operand" "")))]
+       (sign_extend:HI (match_operand:QI 1 "register_operand" "")))]
   ""
   "")
 
    (set_attr "cc" "clobber,clobber")])
 
 (define_insn ""
-  [(set (match_operand:HI 0 "register_operand" "=r,r")
-       (sign_extend:HI (match_operand:QI 1 "general_operand_src" "0,g>")))]
+  [(set (match_operand:HI 0 "register_operand" "=r")
+       (sign_extend:HI (match_operand:QI 1 "register_operand" "0")))]
   "TARGET_H8300H || TARGET_H8300S"
-  "@
-  exts.w       %T0
-  mov.b        %R1,%s0\;exts.w %T0"
-  [(set_attr "length" "2,4")
-   (set_attr "cc" "set_znv,set_znv")])
+  "exts.w      %T0"
+  [(set_attr "length" "2")
+   (set_attr "cc" "set_znv")])
 
 ;; The compiler can synthesize a 300H variant of this which is
 ;; just as efficient as one that we'd create
 
 (define_expand "extendhisi2"
   [(set (match_operand:SI 0 "register_operand" "")
-       (sign_extend:SI (match_operand:HI 1 "general_operand" "")))]
+       (sign_extend:SI (match_operand:HI 1 "register_operand" "")))]
   ""
   "
 {
    (set_attr "cc" "clobber,clobber")])
 
 (define_insn ""
-  [(set (match_operand:SI 0 "register_operand" "=r,r")
-       (sign_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))]
+  [(set (match_operand:SI 0 "register_operand" "=r")
+       (sign_extend:SI (match_operand:HI 1 "register_operand" "0")))]
   "TARGET_H8300H || TARGET_H8300S"
-  "@
-  exts.l       %S0
-  mov.w        %T1,%T0\;exts.l %S0"
-  [(set_attr "length" "2,4")
-   (set_attr "cc" "set_znv,set_znv")])
+  "exts.l      %S0"
+  [(set_attr "length" "2")
+   (set_attr "cc" "set_znv")])
 \f
 ;; ----------------------------------------------------------------------
 ;; SHIFTS