rs6000.md (*call_indirect_nonlocal_sysv<mode>): Simplify the clause that sets the...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 24 Jan 2018 15:42:30 +0000 (15:42 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Wed, 24 Jan 2018 15:42:30 +0000 (15:42 +0000)
2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
Simplify the clause that sets the length attribute.
(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
(*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
clause that sets the length attribute.
(*sibcall_value_nonlocal_sysv<mode>): Likewise.

From-SVN: r257019

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index c8c2f57e5d9a5f3bccae46ce980bdb7219b8daf2..5920d361f9253e0bc528962179989ecf0c9fd898 100644 (file)
@@ -1,3 +1,12 @@
+2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
+       Simplify the clause that sets the length attribute.
+       (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
+       (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
+       clause that sets the length attribute.
+       (*sibcall_value_nonlocal_sysv<mode>): Likewise.
+
 2018-01-24  Tom de Vries  <tom@codesourcery.com>
 
        PR target/83589
index 37075667e1270d9c2634e538e38e1e7f5ff49ed5..b668dc2742b9d709149c59b09a5d6d044e3df327 100644 (file)
   [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
    (set (attr "length")
        (cond [(and (eq (symbol_ref "which_alternative") (const_int 0))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
-                 (const_string "4")
-              (and (eq (symbol_ref "which_alternative") (const_int 0))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
                        (const_int 0)))
                  (const_string "8")
-              (eq (symbol_ref "which_alternative") (const_int 1))
-                 (const_string "4")
               (and (eq (symbol_ref "which_alternative") (const_int 2))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
+                   (ne (symbol_ref "rs6000_speculate_indirect_jumps")
+                       (const_int 0)))
                  (const_string "8")
               (and (eq (symbol_ref "which_alternative") (const_int 2))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
   [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
    (set (attr "length")
        (cond [(and (eq (symbol_ref "which_alternative") (const_int 0))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
-                 (const_string "4")
-              (and (eq (symbol_ref "which_alternative") (const_int 0))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
                        (const_int 0)))
                  (const_string "8")
-              (eq (symbol_ref "which_alternative") (const_int 1))
-                 (const_string "4")
               (and (eq (symbol_ref "which_alternative") (const_int 2))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
+                   (ne (symbol_ref "rs6000_speculate_indirect_jumps")
+                       (const_int 0)))
                  (const_string "8")
               (and (eq (symbol_ref "which_alternative") (const_int 2))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
   "(DEFAULT_ABI == ABI_DARWIN
     || DEFAULT_ABI == ABI_V4)
    && (INTVAL (operands[2]) & CALL_LONG) == 0"
-  "*
 {
   if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS)
-    output_asm_insn (\"crxor 6,6,6\", operands);
+    output_asm_insn ("crxor 6,6,6", operands);
 
   else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS)
-    output_asm_insn (\"creqv 6,6,6\", operands);
+    output_asm_insn ("creqv 6,6,6", operands);
 
   if (which_alternative >= 2)
     {
       if (rs6000_speculate_indirect_jumps)
-       return \"b%T0\";
+       return "b%T0";
       else
        /* Can use CR0 since it is volatile across sibcalls.  */
-       return \"crset 2\;beq%T0-\;b $\";
+       return "crset 2\;beq%T0-\;b $";
     }
   else if (DEFAULT_ABI == ABI_V4 && flag_pic)
     {
       gcc_assert (!TARGET_SECURE_PLT);
-      return \"b %z0@plt\";
+      return "b %z0@plt";
     }
   else
-    return \"b %z0\";
-}"
+    return "b %z0";
+}
   [(set_attr "type" "branch")
    (set (attr "length")
-       (cond [(eq (symbol_ref "which_alternative") (const_int 0))
-                 (const_string "4")
-              (eq (symbol_ref "which_alternative") (const_int 1))
+       (cond [(eq (symbol_ref "which_alternative") (const_int 1))
                  (const_string "8")
-              (and (eq (symbol_ref "which_alternative") (const_int 2))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
-                 (const_string "4")
               (and (eq (symbol_ref "which_alternative") (const_int 2))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
                        (const_int 0)))
                  (const_string "12")
               (and (eq (symbol_ref "which_alternative") (const_int 3))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
+                   (ne (symbol_ref "rs6000_speculate_indirect_jumps")
+                       (const_int 0)))
                  (const_string "8")
               (and (eq (symbol_ref "which_alternative") (const_int 3))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
   "(DEFAULT_ABI == ABI_DARWIN
     || DEFAULT_ABI == ABI_V4)
    && (INTVAL (operands[3]) & CALL_LONG) == 0"
-  "*
 {
   if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS)
-    output_asm_insn (\"crxor 6,6,6\", operands);
+    output_asm_insn ("crxor 6,6,6", operands);
 
   else if (INTVAL (operands[3]) & CALL_V4_CLEAR_FP_ARGS)
-    output_asm_insn (\"creqv 6,6,6\", operands);
+    output_asm_insn ("creqv 6,6,6", operands);
 
   if (which_alternative >= 2)
     {
       if (rs6000_speculate_indirect_jumps)
-       return \"b%T1\";
+       return "b%T1";
       else
        /* Can use CR0 since it is volatile across sibcalls.  */
-       return \"crset 2\;beq%T1-\;b $\";
+       return "crset 2\;beq%T1-\;b $";
     }
   else if (DEFAULT_ABI == ABI_V4 && flag_pic)
     {
       gcc_assert (!TARGET_SECURE_PLT);
-      return \"b %z1@plt\";
+      return "b %z1@plt";
     }
   else
-    return \"b %z1\";
-}"
+    return "b %z1";
+}
   [(set_attr "type" "branch")
    (set (attr "length")
-       (cond [(eq (symbol_ref "which_alternative") (const_int 0))
-                 (const_string "4")
-              (eq (symbol_ref "which_alternative") (const_int 1))
+       (cond [(eq (symbol_ref "which_alternative") (const_int 1))
                  (const_string "8")
-              (and (eq (symbol_ref "which_alternative") (const_int 2))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
-                 (const_string "4")
               (and (eq (symbol_ref "which_alternative") (const_int 2))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")
                        (const_int 0)))
                  (const_string "12")
               (and (eq (symbol_ref "which_alternative") (const_int 3))
-                   (eq (symbol_ref "rs6000_speculate_indirect_jumps")
-                       (const_int 1)))
+                   (ne (symbol_ref "rs6000_speculate_indirect_jumps")
+                       (const_int 0)))
                  (const_string "8")
               (and (eq (symbol_ref "which_alternative") (const_int 3))
                    (eq (symbol_ref "rs6000_speculate_indirect_jumps")