Fix operand numbers in m68hc11.md
authorStephane Carrez <Stephane.Carrez@worldnet.fr>
Thu, 11 Jan 2001 21:10:39 +0000 (22:10 +0100)
committerStephane Carrez <ciceron@gcc.gnu.org>
Thu, 11 Jan 2001 21:10:39 +0000 (22:10 +0100)
From-SVN: r38924

gcc/ChangeLog
gcc/config/m68hc11/m68hc11.md

index 6c1b1fe..6fc8dc2 100644 (file)
@@ -1,3 +1,15 @@
+2001-01-11  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
+
+       * config/m68hc11/m68hc11.md (*adcq, *subcq): Fix operand numbers.
+       (*ashlsi3_const16_zexthi, *ashlsi3_const1): Likewise.
+       (*lshrsi3_const, *lshrsi3_const1, *lshrsi3_const16): Likewise.
+       (*ashrsi3, *ashrsi3_const, *ashlsi3, *ashlsi3_const): Likewise.
+       (*ashlsi3_const1, *lshrsi3, *ashlsi3_const16): Likewise.
+       (cmphi_z_used): Don't use '@' for the output.
+       (tstqi_z_used): Likewise.
+       (cmpqi_z_used): Likewise.
+       (one_cmplsi2): Likewise.
+
 2001-01-11  Alexandre Oliva  <aoliva@redhat.com>
 
        * config/sh/sh.c (barrier_align): Recognize branch around far
index b833069..6a60b83 100644 (file)
@@ -1,5 +1,5 @@
 ;;- Machine description file for Motorola 68HC11 and 68HC12.
-;;- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+;;- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 ;;- Contributed by Stephane Carrez (stcarrez@worldnet.fr)
 
 ;; This file is part of GNU CC.
    (use (match_operand:HI 1 "hard_reg_operand" "dxy"))
    (use (reg:HI 11))]
   ""
-  "@
-   #")
+  "#")
 
 (define_split /* "tstqi_z_used" */
   [(set (cc0)
    (use (match_operand:HI 2 "hard_reg_operand" "dxy"))
    (use (reg:HI 11))]
   ""
-  "@
-   #")
+  "#")
   
 (define_split /* "cmphi_z_used" */
   [(set (cc0)
    (use (match_operand:HI 2 "hard_reg_operand" "dxy"))
    (use (reg:HI 11))]
   ""
-  "@
-   #")
+  "#")
   
 (define_split /* cmpqi_z_used */
   [(set (cc0)
 (define_insn "*adcq"
   [(set (match_operand:QI 0 "register_operand" "=q")
         (plus:QI (plus:QI (reg:QI 7)
-                          (match_operand:QI 2 "register_operand" "%0"))
-                 (match_operand:QI 3 "general_operand" "ium")))]
+                          (match_operand:QI 1 "register_operand" "%0"))
+                 (match_operand:QI 2 "general_operand" "ium")))]
   ""
-  "adc%0\\t%b3")
+  "adc%0\\t%b2")
 
 ;;--------------------------------------------------------------------
 ;;- Subtract instructions.
 (define_insn "*subcq"
   [(set (match_operand:QI 0 "register_operand" "=q")
         (minus:QI (minus:QI (reg:QI 7)
-                            (match_operand:QI 2 "register_operand" "0"))
-                  (match_operand:QI 3 "general_operand" "ium")))]
+                            (match_operand:QI 1 "register_operand" "0"))
+                  (match_operand:QI 2 "general_operand" "ium")))]
   ""
-  "sbc%0\\t%b3")
+  "sbc%0\\t%b2")
 
 ;;--------------------------------------------------------------------
 ;;- Multiply instructions.
   [(set (match_operand:SI 0 "non_push_operand" "=D")
        (not:SI (match_operand:SI 1 "general_operand" "0")))]
   ""
-  "@
-   bsr\\t___one_cmplsi2")
+  "bsr\\t___one_cmplsi2")
 
 (define_insn "one_cmplhi2"
   [(set (match_operand:HI 0 "non_push_operand" "=d,!um,*A")
   [(set (match_operand:SI 0 "nonimmediate_operand" "=D,*um")
        (ashift:SI (match_operand:SI 1 "general_operand" "Duim,D")
                   (const_int 16)))
-   (clobber (match_scratch:HI 3 "=X,X"))]
+   (clobber (match_scratch:HI 2 "=X,X"))]
    ""
    "#")
 
        (ashift:SI (zero_extend:HI 
                        (match_operand:HI 1 "general_operand" "duim*A"))
                   (const_int 16)))
-   (clobber (match_scratch:HI 3 "=X"))]
+   (clobber (match_scratch:HI 2 "=X"))]
    ""
    "#")
 
        (ashift:SI (zero_extend:HI 
                        (match_operand:HI 1 "general_operand" "duim*a"))
                   (const_int 16)))
-   (clobber (match_scratch:HI 3 "=X"))]
+   (clobber (match_scratch:HI 2 "=X"))]
    "reload_completed"
    [(set (reg:HI 0) (match_dup 1))
     (set (reg:HI 1) (const_int 0))]
   [(set (match_operand:SI 0 "non_push_operand" "=D,D,*um,?*um")
        (ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0,*um,0,*um")
                   (const_int 1)))
-   (clobber (match_scratch:HI 3 "=X,X,&d,&d"))]
+   (clobber (match_scratch:HI 2 "=X,X,&d,&d"))]
    ""
    "*
 {
 (define_insn "*ashlsi3_const"
   [(set (match_operand:SI 0 "register_operand" "+D")
        (ashift:SI (match_dup 0)
-                  (match_operand:HI 2 "const_int_operand" "")))
-   (clobber (match_scratch:HI 3 "=y"))]
+                  (match_operand:HI 1 "const_int_operand" "")))
+   (clobber (match_scratch:HI 2 "=y"))]
    ""
    "*
 {
   CC_STATUS_INIT;
-  return \"ldy\\t%2\\n\\tbsr\\t___ashlsi3\";
+  return \"ldy\\t%1\\n\\tbsr\\t___ashlsi3\";
 }")
 
 (define_insn "*ashlsi3"
   [(set (match_operand:SI 0 "register_operand" "+D,D")
        (ashift:SI (match_dup 0)
-                  (match_operand:HI 2 "general_operand" "y,m")))
-   (clobber (match_scratch:HI 3 "=2,X"))]
+                  (match_operand:HI 1 "general_operand" "y,m")))
+   (clobber (match_scratch:HI 2 "=1,X"))]
    ""
    "*
 {
      and this conflicts with all reloads.  Since X, Y, Z are used there
      is not enough register in class A_REGS.
 
-     Assuming that 'operands[2]' does not refer to the stack (which 
+     Assuming that 'operands[1]' does not refer to the stack (which 
      is true for 68hc11 only, we save temporary the value of Y.  */
-  if (!Y_REG_P (operands[3]))
+  if (!Y_REG_P (operands[2]))
     {
       output_asm_insn (\"pshy\", operands);
-      output_asm_insn (\"ldy\\t%2\", operands);
+      output_asm_insn (\"ldy\\t%1\", operands);
       output_asm_insn (\"bsr\\t___ashlsi3\", operands);
       return \"puly\";
     }
 (define_insn "*ashrsi3_const"
   [(set (match_operand:SI 0 "register_operand" "+D")
        (ashiftrt:SI (match_dup 0)
-                    (match_operand:HI 2 "const_int_operand" "")))
-   (clobber (match_scratch:HI 3 "=y"))]
+                    (match_operand:HI 1 "const_int_operand" "")))
+   (clobber (match_scratch:HI 2 "=y"))]
    ""
    "*
 {
   CC_STATUS_INIT;
-  return \"ldy\\t%2\\n\\tbsr\\t___ashrsi3\";
+  return \"ldy\\t%1\\n\\tbsr\\t___ashrsi3\";
 }")
 
 (define_insn "*ashrsi3"
   [(set (match_operand:SI 0 "register_operand" "+D,D")
        (ashiftrt:SI (match_dup 0)
-                    (match_operand:HI 2 "general_operand" "y,m")))
-   (clobber (match_scratch:HI 3 "=2,X"))]
+                    (match_operand:HI 1 "general_operand" "y,m")))
+   (clobber (match_scratch:HI 2 "=1,X"))]
    ""
    "*
 {
      and this conflicts with all reloads.  Since X, Y, Z are used there
      is not enough register in class A_REGS.
 
-     Assuming that 'operands[2]' does not refer to the stack (which 
+     Assuming that 'operands[1]' does not refer to the stack (which 
      is true for 68hc11 only, we save temporary the value of Y.  */
-  if (!Y_REG_P (operands[3]))
+  if (!Y_REG_P (operands[2]))
     {
       output_asm_insn (\"pshy\", operands);
-      output_asm_insn (\"ldy\\t%2\", operands);
+      output_asm_insn (\"ldy\\t%1\", operands);
       output_asm_insn (\"bsr\\t___ashrsi3\", operands);
       return \"puly\";
     }
   [(set (match_operand:SI 0 "non_push_operand" "=D,D,um")
        (lshiftrt:SI (match_operand:SI 1 "general_operand" "uim,0,D")
                     (const_int 16)))
-   (clobber (match_scratch:HI 3 "=X,X,X"))]
+   (clobber (match_scratch:HI 2 "=X,X,X"))]
    ""
    "#
     xgdx\\n\\tldx\\t#0
   [(set (match_operand:SI 0 "non_push_operand" "=D,*um")
        (lshiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "D*um,*um")
                     (const_int 1)))
-   (clobber (match_scratch:HI 3 "=X,&d"))]
+   (clobber (match_scratch:HI 2 "=X,&d"))]
    ""
    "*
 {
 (define_insn "*lshrsi3_const"
   [(set (match_operand:SI 0 "register_operand" "+D")
        (lshiftrt:SI (match_dup 0)
-                    (match_operand:HI 2 "const_int_operand" "")))
-   (clobber (match_scratch:HI 3 "=y"))]
+                    (match_operand:HI 1 "const_int_operand" "")))
+   (clobber (match_scratch:HI 2 "=y"))]
    ""
    "*
 {
   CC_STATUS_INIT;
-  return \"ldy\\t%2\\n\\tbsr\\t___lshrsi3\";
+  return \"ldy\\t%1\\n\\tbsr\\t___lshrsi3\";
 }")
 
 (define_insn "*lshrsi3"
   [(set (match_operand:SI 0 "register_operand" "+D,D")
        (lshiftrt:SI (match_dup 0)
-                    (match_operand:HI 2 "general_operand" "y,m")))
-   (clobber (match_scratch:HI 3 "=2,X"))]
+                    (match_operand:HI 1 "general_operand" "y,m")))
+   (clobber (match_scratch:HI 2 "=1,X"))]
    ""
    "*
 {
      and this conflicts with all reloads.  Since X, Y, Z are used there
      is not enough register in class A_REGS.
 
-     Assuming that 'operands[2]' does not refer to the stack (which 
+     Assuming that 'operands[1]' does not refer to the stack (which 
      is true for 68hc11 only, we save temporary the value of Y.  */
-  if (!Y_REG_P (operands[3]))
+  if (!Y_REG_P (operands[2]))
     {
       output_asm_insn (\"pshy\", operands);
-      output_asm_insn (\"ldy\\t%2\", operands);
+      output_asm_insn (\"ldy\\t%1\", operands);
       output_asm_insn (\"bsr\\t___lshrsi3\", operands);
       return \"puly\";
     }