From patchwork Tue Apr 26 18:18:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566103 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3862305map; Tue, 26 Apr 2022 12:03:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbnPMVOgRxrRwiCEpsUkF1EeWL3eFJQgIEGajhQ7sx6m5JXeR1imPbAgk7DU4ocdcsU26Q X-Received: by 2002:a0d:d5d2:0:b0:2f7:c85d:2c0d with SMTP id x201-20020a0dd5d2000000b002f7c85d2c0dmr16680552ywd.5.1650999830618; Tue, 26 Apr 2022 12:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650999830; cv=none; d=google.com; s=arc-20160816; b=XlAEkNQGewKTWE9FA9U55HH2xFXkr8+FIIqCeuPf6QZap7JiH8iyGnZz8JgXV+MoP4 C02JFKrauQZQsS97TuyHNpXL99/6OMIRWZiivmAi2q9EQTcCIayCu7NWtYla7ocpYQpx XSwrNc5x7wCbTmxcCrl4OEcpYBtB6yM1WXZV9Ma4MP1W2TK6plWIKb4j8IyDZEM1lBup SsLM3cPFqC1O94Q+qNOfZbTowXV8zXFwt3EORDrU5IJxROUU69IU3bz3304hdYZz7O/b E8wOdz2LTsf4UCoyuQq66TunpmipHktnU9DD9KPh+wflQt9EXWVw0EdEx5xxvPPVXt2S TYhw== 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=Ye00+f937DzjmYFcQBAIIaxN5ODYSNdMuba5fZB95Nk=; b=X6/uNzIWrmQzOwvGXzRnTQ4V0HtVsDKj2c5ePsVNAbo3o3m6vytfeCLp3U7vydvHzK Yjp62fUqbmWmA/3QengYDhc6IDojKC8KRsM3uzdg80xH7Ra1F2C6XKuN9/6lCEgh2Qxt w96sLyFLyE5tk2AlqWPuRC7k6IIdRpf9YUKMR0D7O661BJgGEKV3ZdU4mgHNZvEN+QVa zWDspbw/dBN9cTzy9iWhplnxGAANEv7cyUDLeJZCT7B37flP3rHkZtfbt+juO97m/rsR +1fG3OndkZAg9zf3vRN2CBFhmQIf6fAwGybFSDAYVWs5PZV1QtnNhA7egMYY9sFKaOeO fstA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cEgqXvwp; 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=pass (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 66-20020a251445000000b0064577f08606si12544173ybu.444.2022.04.26.12.03.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 12:03:50 -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=pass header.i=@linaro.org header.s=google header.b=cEgqXvwp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njQTW-0005tk-2a for patch@linaro.org; Tue, 26 Apr 2022 15:03:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njPml-0002hL-Kw for qemu-devel@nongnu.org; Tue, 26 Apr 2022 14:19:40 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:33437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njPmj-0004Rs-CB for qemu-devel@nongnu.org; Tue, 26 Apr 2022 14:19:39 -0400 Received: by mail-pf1-x42b.google.com with SMTP id p12so7000846pfn.0 for ; Tue, 26 Apr 2022 11:19:36 -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=Ye00+f937DzjmYFcQBAIIaxN5ODYSNdMuba5fZB95Nk=; b=cEgqXvwpOXaCg3eVrUzuOv0AHEB8YsY6xpXROzkOF4LS3qCsWFeZGQ3m2ViCk92pmP kDxM2VgMUWnmh6zvtjNbAl2xQYNTphx2VcDXOiQsi0xah6c5tcxK9Q62VAGEsmSg1Cfc npc+wiElVSV5JL5JGlb6Jf8wwRvC9GpN7xA1oyUhjHFAcTMdReolP1rqf3w5Iu0hzYJb Z8Ru72EhAR01gf0MQQRDljeijCZHPHkgQ6AwmObPhB3yDJM0GdeTc8F5wiOCXy52rgJh S3PVTk5c82cSsvYHjAM3w7YHyUSOTf4ChjU9IybfakzCJZs1YSYeIkXhvLuliIsGY8Iq bGjw== 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=Ye00+f937DzjmYFcQBAIIaxN5ODYSNdMuba5fZB95Nk=; b=U39x2oG+X6k4CuZseF8DIKwO0pYOh/uY9kZwv9ST9YtKx7jB7Dj+bRTn1hSo1cY1Xo dD2k4p6vAo5m55jlLLs6sWu86y/7au1qqV5epmV0PkVId/TaSK9DOSKZBOifQKlYnONt ZP/Zeu8KchA8apTcyOSYnojp7QaLYRrv8anVaeN6QqcunY94slFM+EgzB0rie3ekYiWS nSIsLFgVUnrECp6KjLoeJ1O88/fAWpw6+Ymnf2cBI7F/1CUuSCweyfN6ts8BVcJjkqbU U+MkY/jhTN7f9FQv5ugM3bJrlrzkK9kULRj3PIqEUHYyw2XNZEnjTxXoAddcOLvLkkX0 ZKvA== X-Gm-Message-State: AOAM531uPl/L8/Y9VoN35VZV3RguSonc310dalOOcwYh0QU1h23C2c90 S3LZ1TV5D4kHevL1Ds59kXyA/EqbuOD9PQ== X-Received: by 2002:aa7:84d9:0:b0:50d:3254:db8b with SMTP id x25-20020aa784d9000000b0050d3254db8bmr15583124pfn.78.1650997175943; Tue, 26 Apr 2022 11:19:35 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id j7-20020a056a00130700b004b9f7cd94a4sm16482827pfu.56.2022.04.26.11.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 11:19:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 30/68] target/nios2: Move R_FOO and CR_BAR into enumerations Date: Tue, 26 Apr 2022 11:18:29 -0700 Message-Id: <20220426181907.103691-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426181907.103691-1-richard.henderson@linaro.org> References: <20220426181907.103691-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These symbols become available to the debugger. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-Id: <20220421151735.31996-31-richard.henderson@linaro.org> --- target/nios2/cpu.h | 72 ++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index f312050ecd..65bcc5fc0e 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -61,25 +61,43 @@ struct Nios2CPUClass { #define NUM_CR_REGS 32 /* General purpose register aliases */ -#define R_ZERO 0 -#define R_AT 1 -#define R_RET0 2 -#define R_RET1 3 -#define R_ARG0 4 -#define R_ARG1 5 -#define R_ARG2 6 -#define R_ARG3 7 -#define R_ET 24 -#define R_BT 25 -#define R_GP 26 -#define R_SP 27 -#define R_FP 28 -#define R_EA 29 -#define R_BA 30 -#define R_RA 31 +enum { + R_ZERO = 0, + R_AT = 1, + R_RET0 = 2, + R_RET1 = 3, + R_ARG0 = 4, + R_ARG1 = 5, + R_ARG2 = 6, + R_ARG3 = 7, + R_ET = 24, + R_BT = 25, + R_GP = 26, + R_SP = 27, + R_FP = 28, + R_EA = 29, + R_BA = 30, + R_RA = 31, +}; /* Control register aliases */ -#define CR_STATUS 0 +enum { + CR_STATUS = 0, + CR_ESTATUS = 1, + CR_BSTATUS = 2, + CR_IENABLE = 3, + CR_IPENDING = 4, + CR_CPUID = 5, + CR_EXCEPTION = 7, + CR_PTEADDR = 8, + CR_TLBACC = 9, + CR_TLBMISC = 10, + CR_ENCINJ = 11, + CR_BADADDR = 12, + CR_CONFIG = 13, + CR_MPUBASE = 14, + CR_MPUACC = 15, +}; FIELD(CR_STATUS, PIE, 0, 1) FIELD(CR_STATUS, U, 1, 1) @@ -98,24 +116,12 @@ FIELD(CR_STATUS, RSIE, 23, 1) #define CR_STATUS_NMI R_CR_STATUS_NMI_MASK #define CR_STATUS_RSIE R_CR_STATUS_RSIE_MASK -#define CR_ESTATUS 1 -#define CR_BSTATUS 2 -#define CR_IENABLE 3 -#define CR_IPENDING 4 -#define CR_CPUID 5 -#define CR_CTL6 6 -#define CR_EXCEPTION 7 - FIELD(CR_EXCEPTION, CAUSE, 2, 5) FIELD(CR_EXCEPTION, ECCFTL, 31, 1) -#define CR_PTEADDR 8 - FIELD(CR_PTEADDR, VPN, 2, 20) FIELD(CR_PTEADDR, PTBASE, 22, 10) -#define CR_TLBACC 9 - FIELD(CR_TLBACC, PFN, 0, 20) FIELD(CR_TLBACC, G, 20, 1) FIELD(CR_TLBACC, X, 21, 1) @@ -130,8 +136,6 @@ FIELD(CR_TLBACC, IG, 25, 7) #define CR_TLBACC_X R_CR_TLBACC_X_MASK #define CR_TLBACC_G R_CR_TLBACC_G_MASK -#define CR_TLBMISC 10 - FIELD(CR_TLBMISC, D, 0, 1) FIELD(CR_TLBMISC, PERM, 1, 1) FIELD(CR_TLBMISC, BAD, 2, 1) @@ -150,12 +154,6 @@ FIELD(CR_TLBMISC, EE, 24, 1) #define CR_TLBMISC_PERM R_CR_TLBMISC_PERM_MASK #define CR_TLBMISC_D R_CR_TLBMISC_D_MASK -#define CR_ENCINJ 11 -#define CR_BADADDR 12 -#define CR_CONFIG 13 -#define CR_MPUBASE 14 -#define CR_MPUACC 15 - /* Exceptions */ #define EXCP_BREAK 0x1000 #define EXCP_RESET 0