[NDS32] Set call address constraint.
authorChung-Ju Wu <jasonwucj@gmail.com>
Sun, 20 May 2018 16:03:45 +0000 (16:03 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 20 May 2018 16:03:45 +0000 (16:03 +0000)
gcc/
* config/nds32/constraints.md (S): New constraint.
* config/nds32/nds32.md (call_internal): Use constraint S.
(call_value_internal): Likewise.
(sibcall_internal): Likewise.
(sibcall_value_internal): Likewise.

From-SVN: r260422

gcc/ChangeLog
gcc/config/nds32/constraints.md
gcc/config/nds32/nds32.md

index d76ff7d01c559b69eea99a129031fb6266053ab6..1389dd0b88ac9ded8286c0d7029814a18d48ba29 100644 (file)
@@ -1,3 +1,11 @@
+2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/constraints.md (S): New constraint.
+       * config/nds32/nds32.md (call_internal): Use constraint S.
+       (call_value_internal): Likewise.
+       (sibcall_internal): Likewise.
+       (sibcall_value_internal): Likewise.
+
 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
            Chung-Ju Wu  <jasonwucj@gmail.com>
 
index 500f1a42b5cf149008ad9fcb69fa83e6157fa44c..315c60313e578842fc48ca8571d056fbda492d8b 100644 (file)
        (match_test "(TARGET_FPU_SINGLE || TARGET_FPU_DOUBLE)
                     && nds32_float_mem_operand_p (op)")))
 
+(define_constraint "S"
+  "@internal
+   A constant call address."
+  (match_operand 0 "nds32_symbolic_operand"))
+
 ;; ------------------------------------------------------------------------
index f63ca686c2403cb71bb64c6ed5274e56c4948ac2..63e4efe23da175145aeaed2ce9d0d6a1976edb03 100644 (file)
 )
 
 (define_insn "call_internal"
-  [(parallel [(call (mem (match_operand:SI 0 "nds32_call_address_operand" "r, i"))
+  [(parallel [(call (mem (match_operand:SI 0 "nds32_call_address_operand" "r, S"))
                    (match_operand 1))
              (clobber (reg:SI LP_REGNUM))
              (clobber (reg:SI TA_REGNUM))])]
 
 (define_insn "call_value_internal"
   [(parallel [(set (match_operand 0)
-                  (call (mem (match_operand:SI 1 "nds32_call_address_operand" "r, i"))
+                  (call (mem (match_operand:SI 1 "nds32_call_address_operand" "r, S"))
                         (match_operand 2)))
              (clobber (reg:SI LP_REGNUM))
              (clobber (reg:SI TA_REGNUM))])]
 })
 
 (define_insn "sibcall_internal"
-  [(parallel [(call (mem (match_operand:SI 0 "nds32_call_address_operand" "r, i"))
+  [(parallel [(call (mem (match_operand:SI 0 "nds32_call_address_operand" "r, S"))
                    (match_operand 1))
              (clobber (reg:SI TA_REGNUM))
              (return)])]
 
 (define_insn "sibcall_value_internal"
   [(parallel [(set (match_operand 0)
-                  (call (mem (match_operand:SI 1 "nds32_call_address_operand" "r, i"))
+                  (call (mem (match_operand:SI 1 "nds32_call_address_operand" "r, S"))
                         (match_operand 2)))
              (clobber (reg:SI TA_REGNUM))
              (return)])]