From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ln01.mxout.alfaservers.com (ln01.mxout.alfaservers.com [85.17.185.57]) by sourceware.org (Postfix) with ESMTPS id 9C86D3987410 for ; Tue, 3 Nov 2020 18:48:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9C86D3987410 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=blueice.be Authentication-Results: sourceware.org; spf=none smtp.mailfrom=henri.cloetens@blueice.be Received: from [193.121.150.145] (port=57358 helo=[192.168.178.60]) by ln01.alfaservers.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1ka1M5-00045N-VW; Tue, 03 Nov 2020 19:48:29 +0100 Subject: Re: Issue with reload To: Segher Boessenkool Cc: gcc-help@gcc.gnu.org References: <92aed6b3-c801-438b-29e0-3d6e17d38620@blueice.be> <20201103172357.GK2672@gate.crashing.org> From: Henri Cloetens Message-ID: Date: Tue, 3 Nov 2020 19:49:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201103172357.GK2672@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ln01.alfaservers.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - blueice.be X-Get-Message-Sender-Via: ln01.alfaservers.com: authenticated_id: henri.cloetens@blueice.be X-Authenticated-Sender: ln01.alfaservers.com: henri.cloetens@blueice.be X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 18:48:32 -0000 Hello Segher, - However, the predicate "r" in the statement above, does not allow a subreg. Yes it does. See register_operand in recog.c for example. It is of course possible your gpc_reg_operand doesn't allow it (bad idea, but I don't know your code). It does not. When I change the description to :  (define_insn "movhi_internal" [(set (match_operand:HI 0 "movhi_operand_0" "=r,Z,C,r,r,u,u,r,r,r") (match_operand:HI 1 "movhi_operand_1" "x9,r,r,Z,C,Z,C,O,k,i"))] with x9 defined as "ext_gpc_reg_operand" and (define_predicate "ext_gpc_reg_operand" (and (match_operand 0 "register_operand") ( ior (match_test "( (GET_CODE(op) == REG && ( (REGNO(op) >= ARG_POINTER_REGNUM && !CA_REGNO_P(REGNO(op))) || REGNO(op) == SFP_REGNO || REGNO (op) == ARG_POINTER_REGNUM || REGNO (op) <= MAX_REGFILE_REGNO)))") (match_test "( (GET_CODE(op) == SUBREG && SUBREG_BYTE(op) == 0 && ( (REGNO(SUBREG_REG(op)) >= ARG_POINTER_REGNUM && !CA_REGNO_P(REGNO(SUBREG_REG(op)))) || REGNO(SUBREG_REG(op)) == SFP_REGNO || REGNO (SUBREG_REG(op)) == ARG_POINTER_REGNUM || REGNO (SUBREG_REG(op)) <= MAX_REGFILE_REGNO)))")))) Then, its gone. It now crashes on other "r"'s in the same instruction, as it apparently wants to move this operand on the stack, and for that it needs the "x9" also in other places. It is of course possible something is wrong in my description, but the "r" does not seem to allow the subreg. At least not in my port. I will try putting more "x9"'s tomorrow. Best Regards, Henri.