aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-07-14 09:19:43 +0930
committerAlan Modra <amodra@gmail.com>2020-07-14 09:19:43 +0930
commit8651714a78b5bfa0158bb9361cff67e18d405f66 (patch)
tree3514aa0dc55fb23397751a9a9b3b3bfa45173363 /gcc
parent94c7c67b82dd7255fde0d7ae42d483336ea1b60b (diff)
downloadgcc-8651714a78b5bfa0158bb9361cff67e18d405f66.zip
gcc-8651714a78b5bfa0158bb9361cff67e18d405f66.tar.gz
gcc-8651714a78b5bfa0158bb9361cff67e18d405f66.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000.md45
1 files 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<mode>"
+ [(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<mode>"
[(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<mode>"
[(call (mem:SI (match_operand:P 0 "indirect_call_operand" "c,*l,X"))
(match_operand 1))