[NDS32] Refine condition of stack_push and stack_pop patterns.
authorChung-Ju Wu <jasonwucj@gmail.com>
Fri, 6 Apr 2018 06:33:44 +0000 (06:33 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Fri, 6 Apr 2018 06:33:44 +0000 (06:33 +0000)
gcc/
* config/nds32/nds32.md (*stack_push, *stack_pop): Use
NDS32_V3PUSH_AVAILABLE_P macro.

From-SVN: r259162

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

index 979450f612cb7974d9c7e1bf38da50a6880524b4..092927022334a1bb538a81a48605413497fa0217 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/nds32.md (*stack_push, *stack_pop): Use
+       NDS32_V3PUSH_AVAILABLE_P macro.
+
 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
            Chung-Ju Wu  <jasonwucj@gmail.com>
 
index 25ae3144a1fbe8d5b2f55fe2d6e253fcf50d39cf..cb42d04773adf79e02c96602ec9643df5e316292 100644 (file)
    (set_attr "combo" "12")
    (set_attr "enabled" "yes")
    (set (attr "length")
-       (if_then_else (match_test "TARGET_V3PUSH
-                                  && !nds32_isr_function_p (cfun->decl)
-                                  && (cfun->machine->va_args_size == 0)")
+       (if_then_else (match_test "NDS32_V3PUSH_AVAILABLE_P")
                      (const_int 2)
                      (const_int 4)))])
 
    (set_attr "combo" "12")
    (set_attr "enabled" "yes")
    (set (attr "length")
-       (if_then_else (match_test "TARGET_V3PUSH
-                                  && !nds32_isr_function_p (cfun->decl)
-                                  && (cfun->machine->va_args_size == 0)")
+       (if_then_else (match_test "NDS32_V3PUSH_AVAILABLE_P")
                      (const_int 2)
                      (const_int 4)))])