From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 7D2F0385800D for ; Tue, 15 Dec 2020 08:26:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7D2F0385800D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6C011B271; Tue, 15 Dec 2020 08:26:12 +0000 (UTC) Subject: Re: [PATCH 29/31] PDP11: Use `const_double_zero' to express double zero constant To: "Maciej W. Rozycki" , gcc-patches@gcc.gnu.org Cc: Anders Magnusson References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <4c18d30e-dc77-8d67-03db-c357498040ae@suse.cz> Date: Tue, 15 Dec 2020 09:26:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2020 08:26:15 -0000 On 11/20/20 4:36 AM, Maciej W. Rozycki wrote: > We do not define a comparison operation between floating-point and > integer data, including integer zero constant. Consequently the RTL > instruction stream presented to the post-reload comparison elimination > pass will include, where applicable, floating-point comparison insns > against `const_double:DF 0.0 [0x0.0p+0]' rather than `const_int 0 [0]', > meaning that the latter expression will not match when used in machine > description. > > Use `const_double_zero' then for the relevant patterns to match the > intended RTL instructions. > > gcc/ > * config/pdp11/pdp11.md (fcc_cc, fcc_ccnz): Use > `const_double_zero' to express double zero constant. > --- > gcc/config/pdp11/pdp11.md | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md > index 7a4d50fdba9..cdef49f3979 100644 > --- a/gcc/config/pdp11/pdp11.md > +++ b/gcc/config/pdp11/pdp11.md > @@ -105,7 +105,7 @@ (define_subst "fcc_cc" > (clobber (reg FCC_REGNUM))] > "" > [(set (reg:CC FCC_REGNUM) > - (compare:CC (match_dup 1) (const_int 0))) > + (compare:CC (match_dup 1) (const_double_zero))) > (set (match_dup 0) (match_dup 1))]) > > (define_subst "fcc_ccnz" > @@ -113,7 +113,7 @@ (define_subst "fcc_ccnz" > (clobber (reg FCC_REGNUM))] > "" > [(set (reg:CCNZ FCC_REGNUM) > - (compare:CCNZ (match_dup 1) (const_int 0))) > + (compare:CCNZ (match_dup 1) (const_double_zero))) > (set (match_dup 0) (match_dup 1))]) > > (define_subst_attr "cc_cc" "cc_cc" "_nocc" "_cc") > Hello. If I see correctly, starting from this revision I can't compile a cross compiler of x86_64-linux-gnu: ../configure --target=pdp11-aout --disable-bootstrap --enable-languages=c,c++ --disable-multilib --enable-obsolete $ make build/genemit ../../gcc/common.md ../../gcc/config/pdp11/pdp11.md \ insn-conditions.md > tmp-emit.c genemit: Internal error: abort in gen_exp, at genemit.c:202 make: *** [Makefile:2427: s-emit] Error 1 $ Breakpoint 1, fancy_abort (file=0x435238 "../../gcc/genemit.c", line=202, func=0x435230 "gen_exp") at ../../gcc/errors.c:133 133 internal_error ("abort in %s, at %s:%d", func, trim_filename (file), line); (gdb) bt #0 fancy_abort (file=0x435238 "../../gcc/genemit.c", line=202, func=0x435230 "gen_exp") at ../../gcc/errors.c:133 #1 0x0000000000402e4b in gen_exp (x=0x470de0, subroutine_type=DEFINE_INSN, used=0x4aa4b0 "", info=0x7fffffffdea0) at ../../gcc/genemit.c:202 #2 0x0000000000402f68 in gen_exp (x=0x4d6c70, subroutine_type=DEFINE_INSN, used=0x4aa4b0 "", info=0x7fffffffdea0) at ../../gcc/genemit.c:227 #3 0x0000000000402f68 in gen_exp (x=0x4d6c50, subroutine_type=DEFINE_INSN, used=0x4aa4b0 "", info=0x7fffffffdea0) at ../../gcc/genemit.c:227 #4 0x000000000040307d in gen_exp (x=0x4aa490, subroutine_type=DEFINE_INSN, used=0x4aa4b0 "", info=0x7fffffffdea0) at ../../gcc/genemit.c:255 #5 0x00000000004036c1 in gen_insn (info=0x7fffffffdea0) at ../../gcc/genemit.c:435 #6 0x0000000000404930 in main (argc=3, argv=0x7fffffffdfc8) at ../../gcc/genemit.c:911 Can you please take a look? Thanks, Martin