From 8651714a78b5bfa0158bb9361cff67e18d405f66 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 14 Jul 2020 09:19:43 +0930 Subject: [PATCH] Merge sibcall_local32/64 This patch consolidates four insn patterns into two. * config/rs6000/rs6000.md (sibcall_local): Merge sibcall_local32 and sibcall_local64. (sibcall_value_local): Similarly. --- gcc/config/rs6000/rs6000.md | 45 ++++----------------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index e608a17..3a33982 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11024,8 +11024,8 @@ DONE; }) -(define_insn "*sibcall_local32" - [(call (mem:SI (match_operand:SI 0 "current_file_function_operand" "s,s")) +(define_insn "*sibcall_local" + [(call (mem:SI (match_operand:P 0 "current_file_function_operand" "s,s")) (match_operand 1)) (use (match_operand:SI 2 "immediate_operand" "O,n")) (simple_return)] @@ -11042,27 +11042,9 @@ [(set_attr "type" "branch") (set_attr "length" "4,8")]) -(define_insn "*sibcall_local64" - [(call (mem:SI (match_operand:DI 0 "current_file_function_operand" "s,s")) - (match_operand 1)) - (use (match_operand:SI 2 "immediate_operand" "O,n")) - (simple_return)] - "TARGET_64BIT && (INTVAL (operands[2]) & CALL_LONG) == 0" -{ - if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) - 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); - - return (DEFAULT_ABI == ABI_V4 && flag_pic) ? "b %z0@local" : "b %z0"; -} - [(set_attr "type" "branch") - (set_attr "length" "4,8")]) - -(define_insn "*sibcall_value_local32" +(define_insn "*sibcall_value_local" [(set (match_operand 0 "" "") - (call (mem:SI (match_operand:SI 1 "current_file_function_operand" "s,s")) + (call (mem:SI (match_operand:P 1 "current_file_function_operand" "s,s")) (match_operand 2))) (use (match_operand:SI 3 "immediate_operand" "O,n")) (simple_return)] @@ -11079,25 +11061,6 @@ [(set_attr "type" "branch") (set_attr "length" "4,8")]) -(define_insn "*sibcall_value_local64" - [(set (match_operand 0 "" "") - (call (mem:SI (match_operand:DI 1 "current_file_function_operand" "s,s")) - (match_operand 2))) - (use (match_operand:SI 3 "immediate_operand" "O,n")) - (simple_return)] - "TARGET_64BIT && (INTVAL (operands[3]) & CALL_LONG) == 0" -{ - if (INTVAL (operands[3]) & CALL_V4_SET_FP_ARGS) - 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); - - return (DEFAULT_ABI == ABI_V4 && flag_pic) ? "b %z1@local" : "b %z1"; -} - [(set_attr "type" "branch") - (set_attr "length" "4,8")]) - (define_insn "*sibcall_indirect_nonlocal_sysv" [(call (mem:SI (match_operand:P 0 "indirect_call_operand" "c,*l,X")) (match_operand 1)) -- 2.7.4