From patchwork Fri Apr 22 16:51:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 564855 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp670339map; Fri, 22 Apr 2022 10:11:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzbg0AkeMlfJSv2n2B1pB3X56oMOxkMGcWU28PbI2r3AvvgvEXpJrP8MJSU8Zr32QWQoBD X-Received: by 2002:a37:ba45:0:b0:69b:e728:34b7 with SMTP id k66-20020a37ba45000000b0069be72834b7mr3297050qkf.606.1650647508006; Fri, 22 Apr 2022 10:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650647508; cv=none; d=google.com; s=arc-20160816; b=OuDn1LctG5jkiPLOeCOX9BGJsdj+ErvFeP5+fypqRKXBFrkVzRgff28X0yWT7tdImO Hx6ra74cDhTgRCoK8bckTwFBKGxNRPrVe232arqdOuGGEuh5fw7Ur5B/fYlaCoOlLrFr ljASUciE0kkSusgS5aLnfE3whfP6PuIjutDSejkAM+QfgWoSkYrLlGxrvBapHEo+qDrQ ULugBS8jyZ1h8HvAReo4rFAR+jJC6T2UcKOkjGC3aEhFZ7RNeEU1806idLy+/w1jkvE3 kHGLMpB+3E3445V6ge5rD7dTeW0TzroVKCw4JpsXmmADU7/6iSX3r4Vv1ZBzbJKsP3h7 ZOuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=oxknAb8WZp8/c3OBXmugT+dPS7TU38e5j5a7fcIuSm4=; b=iT3iNMw8YTl0Hh65sE+zhsy1XZ+ZoLte44mLa0Dbb5ifoNHOlGabDrDnvd4fg+WzOq MMdQLuXohKBW/hu/w+2WCTK1RWcYDySUFvTyuy7ZG871leGBOLYmHA4G/UlKcfhOLoe5 QxccHzZBgME3yglze4daqe/NtZHSt9A7NmG8jDUghhfKoxBblLSb2zhyNlaa2bpzza4w vUNOL4qteESTZhaqSZ+KKKsenzIjetGsPPzOVAIJnLV0fUieaI75f2SxapC3p2Cmqe1I 0GXRT0swVbi6NzGa/Kba5PwzQo5TrOR3maxQKhVv7SqmrJ4NtKsAEJRRTw7zU6iJFgP3 dC4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IoymGMka; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gs5-20020a056214226500b0044b57237477si2285755qvb.528.2022.04.22.10.11.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Apr 2022 10:11:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IoymGMka; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhwot-0005cf-K4 for patch@linaro.org; Fri, 22 Apr 2022 13:11:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhwWs-0000uC-MT for qemu-devel@nongnu.org; Fri, 22 Apr 2022 12:53:11 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:35497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhwWq-0007G6-Tv for qemu-devel@nongnu.org; Fri, 22 Apr 2022 12:53:10 -0400 Received: by mail-pl1-x62e.google.com with SMTP id b7so12100774plh.2 for ; Fri, 22 Apr 2022 09:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oxknAb8WZp8/c3OBXmugT+dPS7TU38e5j5a7fcIuSm4=; b=IoymGMkaQHLkEE9DJgGqrb/WVJDXocJ8mKxYjwS/N/Ao2cu+rc8QbywJ+On1zN4UbS roaVfdnVLYN7Aoz4t5rvFSfS47WqgVZ5j7kGPabNiWt9EYNR0oWcp9FjQy48pu6xAXbF k3ynDJLCmhCYp/aZ/mAg3Pwt2v7xsPrnymh/TeVXHgW0dt7FuSGhFVIsdP2Ck5Y/GofY GoikMdeFmI99Q+1jvGlyK886MHAwJDF85VB6FwitXITxt7QJizGSzhwicyG9TUfVo6mw N/ddwhrnxJFQMBgA+fKZCNAl9C0aY8ek5JeV1wnYSc+eZ6oecjpoohkE7eNbPajO/hQc yQaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oxknAb8WZp8/c3OBXmugT+dPS7TU38e5j5a7fcIuSm4=; b=GQrN0h9wfTbx7e1NO3DS45VEBvNk+B/ozZoH0gWyBcRZuXorOcNrVXe2bjIMG2Ck3E JSX+Cxu0sHQYcUglRffd5xm7nUCdrsMHo1u+Xyf1km9vOyl4juTl9ij1YvV7F+tK3YTj bj6D4kNwEjxHxdb8zNGQ0zuvAHs5kkwngBsB7iJXc1b34y3ZP6Vpmrql99u6ja55f/KB qR42eLisrCj/03ht+rAJhOKvr/ekOW9yME66wANgkgc9NoaRjw5G6G9iZdBVG9n2CT3s Utwbbl7HZFLzLFXZFho75qyBRO+EGeE66P4LOzEdXq1Dy83DemSLotrVGnDXWjhJwbsj suGA== X-Gm-Message-State: AOAM531ldf2FVzCS9hfiKQ1D2zoYsi9n/LAA4wpsHIKdEg9AS+nsvJPY yBizWDk8v54VZv1w0nywecbCrhvCHplNFngm X-Received: by 2002:a17:902:8304:b0:155:d594:5c04 with SMTP id bd4-20020a170902830400b00155d5945c04mr5286451plb.105.1650646387729; Fri, 22 Apr 2022 09:53:07 -0700 (PDT) Received: from stoup.. ([2607:fb90:27d0:b0f2:934d:3e2:9f8c:dd1]) by smtp.gmail.com with ESMTPSA id 6-20020a17090a030600b001cd4989ff5fsm6835904pje.38.2022.04.22.09.53.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 09:53:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v8 15/68] target/nios2: Add NUM_GP_REGS and NUM_CP_REGS Date: Fri, 22 Apr 2022 09:51:45 -0700 Message-Id: <20220422165238.1971496-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220422165238.1971496-1-richard.henderson@linaro.org> References: <20220422165238.1971496-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Amir Gonnen Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Amir Gonnen Split NUM_CORE_REGS into components that can be used elsewhere. Reviewed-by: Peter Maydell Signed-off-by: Amir Gonnen Message-Id: <20220303153906.2024748-3-amir.gonnen@neuroblade.ai> [rth: Split out of a larger patch for shadow register sets.] Signed-off-by: Richard Henderson Message-Id: <20220421151735.31996-16-richard.henderson@linaro.org> --- target/nios2/cpu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 3198c17213..09dc38a4e7 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -56,9 +56,11 @@ struct Nios2CPUClass { #define EXCEPTION_ADDRESS 0x00000004 #define FAST_TLB_MISS_ADDRESS 0x00000008 +#define NUM_GP_REGS 32 +#define NUM_CR_REGS 32 /* GP regs + CR regs + PC */ -#define NUM_CORE_REGS (32 + 32 + 1) +#define NUM_CORE_REGS (NUM_GP_REGS + NUM_CR_REGS + 1) /* General purpose register aliases */ #define R_ZERO 0 @@ -79,7 +81,7 @@ struct Nios2CPUClass { #define R_RA 31 /* Control register aliases */ -#define CR_BASE 32 +#define CR_BASE NUM_GP_REGS #define CR_STATUS (CR_BASE + 0) #define CR_STATUS_PIE (1 << 0) #define CR_STATUS_U (1 << 1)