Commit 0976f13b by Bill Schmidt Committed by William Schmidt

rs6000.md (*call_indirect_nonlocal_sysv<mode>): Simplify the clause that sets the length attribute.

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
parent 018e9cb5
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> 2018-01-24 Tom de Vries <tom@codesourcery.com>
PR target/83589 PR target/83589
......
...@@ -10482,17 +10482,11 @@ ...@@ -10482,17 +10482,11 @@
(set (attr "length") (set (attr "length")
(cond [(and (eq (symbol_ref "which_alternative") (const_int 0)) (cond [(and (eq (symbol_ref "which_alternative") (const_int 0))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (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_int 0)))
(const_string "8") (const_string "8")
(eq (symbol_ref "which_alternative") (const_int 1))
(const_string "4")
(and (eq (symbol_ref "which_alternative") (const_int 2)) (and (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (ne (symbol_ref "rs6000_speculate_indirect_jumps")
(const_int 1))) (const_int 0)))
(const_string "8") (const_string "8")
(and (eq (symbol_ref "which_alternative") (const_int 2)) (and (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (eq (symbol_ref "rs6000_speculate_indirect_jumps")
...@@ -10595,17 +10589,11 @@ ...@@ -10595,17 +10589,11 @@
(set (attr "length") (set (attr "length")
(cond [(and (eq (symbol_ref "which_alternative") (const_int 0)) (cond [(and (eq (symbol_ref "which_alternative") (const_int 0))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (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_int 0)))
(const_string "8") (const_string "8")
(eq (symbol_ref "which_alternative") (const_int 1))
(const_string "4")
(and (eq (symbol_ref "which_alternative") (const_int 2)) (and (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (ne (symbol_ref "rs6000_speculate_indirect_jumps")
(const_int 1))) (const_int 0)))
(const_string "8") (const_string "8")
(and (eq (symbol_ref "which_alternative") (const_int 2)) (and (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (eq (symbol_ref "rs6000_speculate_indirect_jumps")
...@@ -10992,47 +10980,40 @@ ...@@ -10992,47 +10980,40 @@
"(DEFAULT_ABI == ABI_DARWIN "(DEFAULT_ABI == ABI_DARWIN
|| DEFAULT_ABI == ABI_V4) || DEFAULT_ABI == ABI_V4)
&& (INTVAL (operands[2]) & CALL_LONG) == 0" && (INTVAL (operands[2]) & CALL_LONG) == 0"
"*
{ {
if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) 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) 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 (which_alternative >= 2)
{ {
if (rs6000_speculate_indirect_jumps) if (rs6000_speculate_indirect_jumps)
return \"b%T0\"; return "b%T0";
else else
/* Can use CR0 since it is volatile across sibcalls. */ /* 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) else if (DEFAULT_ABI == ABI_V4 && flag_pic)
{ {
gcc_assert (!TARGET_SECURE_PLT); gcc_assert (!TARGET_SECURE_PLT);
return \"b %z0@plt\"; return "b %z0@plt";
} }
else else
return \"b %z0\"; return "b %z0";
}" }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set (attr "length") (set (attr "length")
(cond [(eq (symbol_ref "which_alternative") (const_int 0)) (cond [(eq (symbol_ref "which_alternative") (const_int 1))
(const_string "4")
(eq (symbol_ref "which_alternative") (const_int 1))
(const_string "8") (const_string "8")
(and (eq (symbol_ref "which_alternative") (const_int 2)) (and (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (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_int 0)))
(const_string "12") (const_string "12")
(and (eq (symbol_ref "which_alternative") (const_int 3)) (and (eq (symbol_ref "which_alternative") (const_int 3))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (ne (symbol_ref "rs6000_speculate_indirect_jumps")
(const_int 1))) (const_int 0)))
(const_string "8") (const_string "8")
(and (eq (symbol_ref "which_alternative") (const_int 3)) (and (eq (symbol_ref "which_alternative") (const_int 3))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (eq (symbol_ref "rs6000_speculate_indirect_jumps")
...@@ -11049,47 +11030,40 @@ ...@@ -11049,47 +11030,40 @@
"(DEFAULT_ABI == ABI_DARWIN "(DEFAULT_ABI == ABI_DARWIN
|| DEFAULT_ABI == ABI_V4) || DEFAULT_ABI == ABI_V4)
&& (INTVAL (operands[3]) & CALL_LONG) == 0" && (INTVAL (operands[3]) & CALL_LONG) == 0"
"*
{ {
if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) 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) 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 (which_alternative >= 2)
{ {
if (rs6000_speculate_indirect_jumps) if (rs6000_speculate_indirect_jumps)
return \"b%T1\"; return "b%T1";
else else
/* Can use CR0 since it is volatile across sibcalls. */ /* 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) else if (DEFAULT_ABI == ABI_V4 && flag_pic)
{ {
gcc_assert (!TARGET_SECURE_PLT); gcc_assert (!TARGET_SECURE_PLT);
return \"b %z1@plt\"; return "b %z1@plt";
} }
else else
return \"b %z1\"; return "b %z1";
}" }
[(set_attr "type" "branch") [(set_attr "type" "branch")
(set (attr "length") (set (attr "length")
(cond [(eq (symbol_ref "which_alternative") (const_int 0)) (cond [(eq (symbol_ref "which_alternative") (const_int 1))
(const_string "4")
(eq (symbol_ref "which_alternative") (const_int 1))
(const_string "8") (const_string "8")
(and (eq (symbol_ref "which_alternative") (const_int 2)) (and (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (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_int 0)))
(const_string "12") (const_string "12")
(and (eq (symbol_ref "which_alternative") (const_int 3)) (and (eq (symbol_ref "which_alternative") (const_int 3))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (ne (symbol_ref "rs6000_speculate_indirect_jumps")
(const_int 1))) (const_int 0)))
(const_string "8") (const_string "8")
(and (eq (symbol_ref "which_alternative") (const_int 3)) (and (eq (symbol_ref "which_alternative") (const_int 3))
(eq (symbol_ref "rs6000_speculate_indirect_jumps") (eq (symbol_ref "rs6000_speculate_indirect_jumps")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment