From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by sourceware.org (Postfix) with ESMTP id C1E713858D37 for ; Sat, 12 Feb 2022 08:47:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C1E713858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id 60BEC92009C; Sat, 12 Feb 2022 09:47:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 5AD8E92009B; Sat, 12 Feb 2022 08:47:46 +0000 (GMT) Date: Sat, 12 Feb 2022 08:47:46 +0000 (GMT) From: "Maciej W. Rozycki" To: Jeff Law cc: YunQiang Su , gcc-patches@gcc.gnu.org Subject: Re: [PATCH v2] MIPS: IPL is 8bit in Cause register if TARGET_MCU In-Reply-To: <5028ca31-8f20-f26b-13cc-8b3ea6b7ffb8@gmail.com> Message-ID: References: <20220126032920.1608048-1-yunqiang.su@cipunited.com> <20220209031837.3167330-1-yunqiang.su@cipunited.com> <5028ca31-8f20-f26b-13cc-8b3ea6b7ffb8@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3489.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Sat, 12 Feb 2022 08:47:49 -0000 On Fri, 11 Feb 2022, Jeff Law wrote: > > If MIPS MCU extension is enable, the IPL section in Cause register > > has been expand to 8bit instead of 6bit. > > > > gcc/ChangeLog: > > > > * config/mips/mips.cc (mips_expand_prologue): > > IPL is 8bit for MCU ASE. > OK But this is still wrong AFAICT. The mask is applied to the CP0 Status register according to the comment, but the layout of the interrupt bit-field is different between the CP0 Status and the CP0 Cause registers, so you can't just extract it from one of the two registers and directly apply to the other. I would like to know how this code has been verified. Maciej