From: Bill Schmidt Date: Wed, 24 Jan 2018 15:42:30 +0000 (+0000) Subject: rs6000.md (*call_indirect_nonlocal_sysv): Simplify the clause that sets the... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0976f13bee1b7d472723ce5f37930b54f119feae;p=gcc.git rs6000.md (*call_indirect_nonlocal_sysv): Simplify the clause that sets the length attribute. 2018-01-24 Bill Schmidt * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv): Simplify the clause that sets the length attribute. (*call_value_indirect_nonlocal_sysv): Likewise. (*sibcall_nonlocal_sysv): Clean up code block; simplify the clause that sets the length attribute. (*sibcall_value_nonlocal_sysv): Likewise. From-SVN: r257019 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c8c2f57e5d9..5920d361f92 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-01-24 Bill Schmidt + + * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv): + Simplify the clause that sets the length attribute. + (*call_value_indirect_nonlocal_sysv): Likewise. + (*sibcall_nonlocal_sysv): Clean up code block; simplify the + clause that sets the length attribute. + (*sibcall_value_nonlocal_sysv): Likewise. + 2018-01-24 Tom de Vries PR target/83589 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 37075667e12..b668dc2742b 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -10481,18 +10481,12 @@ [(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") @@ -10594,18 +10588,12 @@ [(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") @@ -10992,47 +10980,40 @@ "(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") @@ -11049,47 +11030,40 @@ "(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")