From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1118) id 9C6F53858D39; Thu, 14 Oct 2021 00:58:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C6F53858D39 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: John David Anglin To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4385] Fix TARGET_SOFT_FLOAT patterns in pa.md X-Act-Checkin: gcc X-Git-Author: John David Anglin X-Git-Refname: refs/heads/master X-Git-Oldrev: 9eb28a0f19b290094a76889e90bd7fefa5da6d11 X-Git-Newrev: 4728afb9894bc94e48d78ee5dc45299ae8d8ad41 Message-Id: <20211014005802.9C6F53858D39@sourceware.org> Date: Thu, 14 Oct 2021 00:58:02 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2021 00:58:02 -0000 https://gcc.gnu.org/g:4728afb9894bc94e48d78ee5dc45299ae8d8ad41 commit r12-4385-g4728afb9894bc94e48d78ee5dc45299ae8d8ad41 Author: John David Anglin Date: Thu Oct 14 00:57:32 2021 +0000 Fix TARGET_SOFT_FLOAT patterns in pa.md 2021-10-13 John David Anglin gcc/ChangeLog: * config/pa/pa.md (cbranchsf4): Disable if TARGET_SOFT_FLOAT. (cbranchdf4): Likewise. Add missing move patterns for TARGET_SOFT_FLOAT. Diff: --- gcc/config/pa/pa.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 10623dd6fdb..13a25381b6d 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1383,7 +1383,7 @@ (match_operand:SF 2 "reg_or_0_operand" "")]) (label_ref (match_operand 3 "" "")) (pc)))] - "" + "! TARGET_SOFT_FLOAT" " { pa_emit_bcond_fp (operands); @@ -1398,7 +1398,7 @@ (match_operand:DF 2 "reg_or_0_operand" "")]) (label_ref (match_operand 3 "" "")) (pc)))] - "" + "! TARGET_SOFT_FLOAT" " { pa_emit_bcond_fp (operands); @@ -2236,6 +2236,29 @@ (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4")]) +(define_insn "" + [(set (match_operand:SI 0 "move_dest_operand" + "=r,r,r,r,r,r,Q,!*q,!r") + (match_operand:SI 1 "move_src_operand" + "A,r,J,N,K,RQ,rM,!rM,!*q"))] + "(register_operand (operands[0], SImode) + || reg_or_0_operand (operands[1], SImode)) + && TARGET_SOFT_FLOAT + && TARGET_64BIT" + "@ + ldw RT'%A1,%0 + copy %1,%0 + ldi %1,%0 + ldil L'%1,%0 + {zdepi|depwi,z} %Z1,%0 + ldw%M1 %1,%0 + stw%M0 %r1,%0 + mtsar %r1 + {mfctl|mfctl,w} %%sar,%0" + [(set_attr "type" "load,move,move,move,shift,load,store,move,move") + (set_attr "pa_combine_type" "addmove") + (set_attr "length" "4,4,4,4,4,4,4,4,4")]) + (define_insn "" [(set (match_operand:SI 0 "indexed_memory_operand" "=R") (match_operand:SI 1 "register_operand" "f"))] @@ -4042,6 +4065,25 @@ (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4,4,4")]) +(define_insn "" + [(set (match_operand:DF 0 "move_dest_operand" + "=!*r,*r,*r,*r,*r,Q") + (match_operand:DF 1 "move_src_operand" + "!*r,J,N,K,RQ,*rG"))] + "(register_operand (operands[0], DFmode) + || reg_or_0_operand (operands[1], DFmode)) + && TARGET_SOFT_FLOAT && TARGET_64BIT" + "@ + copy %1,%0 + ldi %1,%0 + ldil L'%1,%0 + depdi,z %z1,%0 + ldd%M1 %1,%0 + std%M0 %r1,%0" + [(set_attr "type" "move,move,move,shift,load,store") + (set_attr "pa_combine_type" "addmove") + (set_attr "length" "4,4,4,4,4,4")]) + (define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") @@ -4200,6 +4242,28 @@ (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4")]) +(define_insn "" + [(set (match_operand:DI 0 "move_dest_operand" + "=r,r,r,r,r,r,Q,!*q,!r") + (match_operand:DI 1 "move_src_operand" + "A,r,J,N,K,RQ,rM,!rM,!*q"))] + "(register_operand (operands[0], DImode) + || reg_or_0_operand (operands[1], DImode)) + && TARGET_SOFT_FLOAT && TARGET_64BIT" + "@ + ldd RT'%A1,%0 + copy %1,%0 + ldi %1,%0 + ldil L'%1,%0 + depdi,z %z1,%0 + ldd%M1 %1,%0 + std%M0 %r1,%0 + mtsar %r1 + {mfctl|mfctl,w} %%sar,%0" + [(set_attr "type" "load,move,move,move,shift,load,store,move,move") + (set_attr "pa_combine_type" "addmove") + (set_attr "length" "4,4,4,4,4,4,4,4,4")]) + (define_insn "" [(set (match_operand:DI 0 "indexed_memory_operand" "=R") (match_operand:DI 1 "register_operand" "f"))] @@ -4405,6 +4469,23 @@ (set_attr "pa_combine_type" "addmove") (set_attr "length" "4,4,4,4,4,4")]) +(define_insn "" + [(set (match_operand:SF 0 "move_dest_operand" + "=!*r,*r,Q") + (match_operand:SF 1 "reg_or_0_or_nonsymb_mem_operand" + "!*rG,RQ,*rG"))] + "(register_operand (operands[0], SFmode) + || reg_or_0_operand (operands[1], SFmode)) + && TARGET_SOFT_FLOAT + && TARGET_64BIT" + "@ + copy %r1,%0 + ldw%M1 %1,%0 + stw%M0 %r1,%0" + [(set_attr "type" "move,load,store") + (set_attr "pa_combine_type" "addmove") + (set_attr "length" "4,4,4")]) + (define_insn "" [(set (match_operand:SF 0 "indexed_memory_operand" "=R") (match_operand:SF 1 "register_operand" "f"))]