]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/ft32/ft32.md
Update copyright years.
[thirdparty/gcc.git] / gcc / config / ft32 / ft32.md
index 984c3b67e32bbc70f208057be9c02fc5efe59adc..94ae2656b28044dc28172f983f1ef9ab5844302e 100644 (file)
@@ -1,5 +1,5 @@
 ;; Machine description for FT32
-;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
 ;; Contributed by FTDI <support@ftdi.com>
 
 ;; This file is part of GCC.
@@ -89,9 +89,9 @@
   "mul.l  %0,%1,%2")
 
 (define_insn "umulsidi3"
-  [(set (match_operand:DI 0 "register_operand" "=r,r")
-    (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r,r"))
-         (zero_extend:DI (match_operand:SI 2 "ft32_rimm_operand" "r,KA"))))
+  [(set (match_operand:DI 0 "register_operand" "=r")
+    (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
+         (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))))
    (clobber (reg:CC CC_REG))]
   ""
   "mul.l  $cc,%1,%2\;muluh.l %h0,%1,%2\;move.l   %0,$cc")
    (clobber (match_scratch:SI 2 "=&r"))
   ]
   ""
-  "ldk.l\t$cc,%l1\;ashl.l\t%2,%0,2\;add.l\t%2,%2,$cc\;jmpi\t%2"
-  )
+  {
+    if (TARGET_NOPM)
+      return \"ldk.l\t$cc,%l1\;ashl.l\t%2,%0,2\;add.l\t%2,%2,$cc\;ldi.l\t%2,%2,0\;jmpi\t%2\";
+    else
+      return \"ldk.l\t$cc,%l1\;ashl.l\t%2,%0,2\;add.l\t%2,%2,$cc\;lpmi.l\t%2,%2,0\;jmpi\t%2\";
+  })
 
 ;; -------------------------------------------------------------------------
 ;; Atomic exchange instruction
 "stpcpy %b1,%b2 # %0 %b1 %b2"
 )
 
-(define_insn "movmemsi"
+(define_insn "cpymemsi"
   [(set (match_operand:BLK 0 "memory_operand" "=W,BW")
         (match_operand:BLK 1 "memory_operand" "W,BW"))
         (use (match_operand:SI 2 "ft32_imm_operand" "KA,KA"))