[gcc(refs/users/ppalka/heads/libstdcxx-floating-to_chars)] Merge sibcall_local32/64
Patrick Palka
ppalka@gcc.gnu.org
Tue Jul 14 19:43:47 GMT 2020
https://gcc.gnu.org/g:8651714a78b5bfa0158bb9361cff67e18d405f66
commit 8651714a78b5bfa0158bb9361cff67e18d405f66
Author: Alan Modra <amodra@gmail.com>
Date: Tue Jul 14 09:19:43 2020 +0930
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.
Diff:
---
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 e608a17156c..3a339821e51 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))
More information about the Gcc-cvs
mailing list