From 7af10dfe941acafa5c64602535256823d86ae6a4 Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Sun, 20 May 2018 16:03:45 +0000 Subject: [PATCH] [NDS32] Set call address constraint. 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 | 8 ++++++++ gcc/config/nds32/constraints.md | 5 +++++ gcc/config/nds32/nds32.md | 8 ++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d76ff7d..1389dd0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-05-20 Chung-Ju Wu + + * 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 Chung-Ju Wu diff --git a/gcc/config/nds32/constraints.md b/gcc/config/nds32/constraints.md index 500f1a4..315c603 100644 --- a/gcc/config/nds32/constraints.md +++ b/gcc/config/nds32/constraints.md @@ -373,4 +373,9 @@ (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")) + ;; ------------------------------------------------------------------------ diff --git a/gcc/config/nds32/nds32.md b/gcc/config/nds32/nds32.md index f63ca68..63e4efe 100644 --- a/gcc/config/nds32/nds32.md +++ b/gcc/config/nds32/nds32.md @@ -1523,7 +1523,7 @@ ) (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))])] @@ -1611,7 +1611,7 @@ (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))])] @@ -1714,7 +1714,7 @@ }) (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)])] @@ -1778,7 +1778,7 @@ (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)])] -- 2.7.4