From patchwork Thu Oct 20 09:32:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 59136 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED814383A5EC for ; Thu, 20 Oct 2022 09:35:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED814383A5EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666258511; bh=0V/tdGhkIsaaiO8Fr+ntbQ2+n7+CJ8QCkEclPJyfQjw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aSO6+vwgfQD1vthB7LCS8a/HvUnyJKN9Q05Tynuo/OPeDeoKhmV78VCAOJVBGfmfq Vt8klOVH8c8YuZdIzOS4P36FuAAQzGvosrBdGDpqp8xXrkoQJhfBJO3h6+Vz0VVsS8 +NBOwq22OnApysiyNyfhzagVnPMaVq/8rYPGlsqA= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 257D73860767 for ; Thu, 20 Oct 2022 09:33:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 257D73860767 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 74B9D300089; Thu, 20 Oct 2022 09:33:46 +0000 (UTC) To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Subject: [PATCH 05/40] cpu/cris: Add u-stall virtual unit to CRIS v32 Date: Thu, 20 Oct 2022 09:32:10 +0000 Message-Id: <24baefe92148f4b7968115ba13de9b0c863a65f6.1666258361.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Gdb-patches From: Tsukasa OI Reply-To: Tsukasa OI Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Because CRIS v32 model does not define u-stall virtual unit, CGEN-generated sim/cris/decodev32.h does not define the function declaration of crisv32f_model_crisv32_u_stall. It led to a hack in commit 4e6e8ba7c565 ("sim: cris: clean up missing func prototype warnings"), manually adding the declaration of crisv32f_model_crisv32_u_stall. To **not** touch CGEN-generated files manually, this commit adds u-stall virtual unit for CRIS v32 to let CGEN generate the function declaration of crisv32f_model_crisv32_u_stall automatically. This is still hackish but less than the previous one. cpu/ChangeLog: * cris.cpu: Add u-stall virtual unit to CRIS v32. --- cpu/cris.cpu | 1 + 1 file changed, 1 insertion(+) diff --git a/cpu/cris.cpu b/cpu/cris.cpu index cd85f4e94e2..a2d054f954c 100644 --- a/cpu/cris.cpu +++ b/cpu/cris.cpu @@ -284,6 +284,7 @@ (unit u-const16 "Fetch 16-bit operand" () 1 1 () () () ()) (unit u-const32 "Fetch 32-bit operand" () 1 1 () () () ()) (unit u-skip4 "Skip 4 bytes" () 1 1 () () () ()) + (unit u-stall "Stall unit" () 1 1 () () () ()) ; For v32, we need to keep track of inputs (for movem destination ; cycle penalties) and output (for e.g. memory source and jump