Message ID | 20220317050538.924111-14-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp874994mag; Wed, 16 Mar 2022 22:12:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycjMb3xSkkw77i88jkAqwLVXVFf7WyZHuGJt6Badt41+6T/bQda86EKorEOgI/yWij/+eq X-Received: by 2002:a05:6214:21a9:b0:440:c9fd:75bb with SMTP id t9-20020a05621421a900b00440c9fd75bbmr2347599qvc.68.1647493921566; Wed, 16 Mar 2022 22:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647493921; cv=none; d=google.com; s=arc-20160816; b=Y+nqChEE3cgCKd/k/0SaGtUCkbBH8EwwLW0rGuQVIc66yP/9cWOKnU/tJi52vK8yI9 ShuhzEnjEKeuFmcwOb2RSVeJL1x5EmL7fjKPQxYpGJ/haEDbOkQ4wfKoXAQ6RyWaUyYb AAiVqFahRtUMumpE2aCg+KS5Sf1Quor222KVpzkGw4n64CVFz7vaUqAJ/CiFynZYA88g NZdzP2c42/R5SE5UjecNq/kybWZI45exO59xJbWELrmFrOdNSvF/z4xpApObw39aGSag K01YRsW9vF/xbYGSGmWNQ4hXsFJ9FAqF5Rd9VGSILd6mFgUu0nHQ9h+VLoUe0yA6xDzx ypqw== 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=Gt6Df7YFZj3yIOaHOAXNxeneFRB5t2HH9HYYGKeZPd8=; b=B4D0tZ4a3+9Grhr3cgX8szaUX5UcRyhUqI1nPJ2QuirewtTXNbVlmcu+Kp7Eq9+WvU S8YDr+KijLbiiQ30xVdp6cIoImgFLhQhU1sXryvYnc3X/q0jsFQmQkM5juoKNUpe3A37 2mkKbywqXkbXrtMeZ8bkkpADo5Hj259gUlcbPhun7CW6FcQgyPDoVz7KQVMRCw2jJSsG yKqnn7T0d5xdSwodiWm/LsvuCud6p9xPZ+sd69KuQgUPtPsl21KnjoLgRz/LyK+5R2xs e4wGp8otXAyXoUIwF2D4SybFBhOQBzPEfnrc28KPjkdAavAdOwE1F0Rp3p1GWXxQ/m4h nBSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=AoMDWL3R; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j20-20020a05620a289400b0067b3047813csi1038132qkp.435.2022.03.16.22.12.01 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Mar 2022 22:12:01 -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=AoMDWL3R; 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]:51692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nUiQb-0006Qh-1K for patch@linaro.org; Thu, 17 Mar 2022 01:12:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nUiKi-0000q5-Vv for qemu-devel@nongnu.org; Thu, 17 Mar 2022 01:05:57 -0400 Received: from [2607:f8b0:4864:20::52f] (port=34784 helo=mail-pg1-x52f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nUiKg-0002Eh-CB for qemu-devel@nongnu.org; Thu, 17 Mar 2022 01:05:56 -0400 Received: by mail-pg1-x52f.google.com with SMTP id t187so1804819pgb.1 for <qemu-devel@nongnu.org>; Wed, 16 Mar 2022 22:05:53 -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=Gt6Df7YFZj3yIOaHOAXNxeneFRB5t2HH9HYYGKeZPd8=; b=AoMDWL3RNV8QZvhwtI2r31hnQFnzdBwZXh3sQMQSWeRPUUM64NXQtZC5IOfcAtFWqs airz4nRvPBkNf87lk9hrvKsK7BRAO0t4N7ghBtoizbeqWBgKVsJO8jTe/I3Taad6Jsur rGQk39/OF8Pdi6eFoURmxpaQaIF8sF8VIJ+XoQK3jwEcTYo5PHroNgb43Y3mi/c/LnhX itzL5EIYzrxDd2cW7JRGp35ZrrMt42vb+ae+U8jGZp7bfFZzVPxvCUpexWyoYPjRwfBC HWnjOFzu3RcVSD3OnGGKMctkSYWXuMuxj5WSjWdOXwdmxs7ZkrwMrQqDTLA+MUCoJoGu awnw== 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=Gt6Df7YFZj3yIOaHOAXNxeneFRB5t2HH9HYYGKeZPd8=; b=wu7y2zZat8mEcrTv59AuCvKTDyiLSYMCOacYiX1vgyiN36xdUJGSPe2Ih6+ezzy7+m WEv62/uIR4ABCuj7dS2oJ9kXR20t9+JMmD6b58e1oLGTDAxTR8CEKzfZpBN7tdTADxjC PQN1SNRJ+EKYqAqFeuOTSQHLAvXNBFt1IGZYqtr26iXgpZmqoy6jnasM5e0eJbyDm9Kj Y6LDBqUiWOJksx0cYSK51mqFTstNWVuFLZj6jrcI7t1lA9nJgelSnprb3Iiu0RCysQk6 UkUufh/OgH7ehdy40qphg0P9tAUgWnWW4O9zJ3Mya6OQH5Fb5c8OtL+CafEKvCX7m+az dC3g== X-Gm-Message-State: AOAM530F0QwEcIPT9UFw32glzJekqllMOsLlx/S5uA6aeTQW8aC6ejYc r5z1F+Zu8+UZ1wMk1geW3B+iZKpb58Sd0g== X-Received: by 2002:a63:944:0:b0:374:5324:eea1 with SMTP id 65-20020a630944000000b003745324eea1mr2307731pgj.366.1647493553084; Wed, 16 Mar 2022 22:05:53 -0700 (PDT) Received: from localhost.localdomain (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id h22-20020a056a001a5600b004f7c17b291asm5101357pfv.87.2022.03.16.22.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:05:52 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH for-7.1 v6 13/51] target/nios2: Use hw/registerfields.h for CR_STATUS fields Date: Wed, 16 Mar 2022 22:05:00 -0700 Message-Id: <20220317050538.924111-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220317050538.924111-1-richard.henderson@linaro.org> References: <20220317050538.924111-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::52f (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: marex@denx.de, amir.gonnen@neuroblade.ai Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/nios2: Shadow register set, EIC and VIC
|
expand
|
On Thu, 17 Mar 2022 at 05:13, Richard Henderson <richard.henderson@linaro.org> wrote: > > Add all fields; retain the helper macros for single bit fields. > So far there are no uses of the multi-bit status fields. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 1bcbc9ed63..ecf8cc929f 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -23,6 +23,7 @@ #include "exec/cpu-defs.h" #include "hw/core/cpu.h" +#include "hw/registerfields.h" #include "qom/object.h" typedef struct CPUArchState CPUNios2State; @@ -79,15 +80,24 @@ struct Nios2CPUClass { /* Control register aliases */ #define CR_STATUS 0 -#define CR_STATUS_PIE (1 << 0) -#define CR_STATUS_U (1 << 1) -#define CR_STATUS_EH (1 << 2) -#define CR_STATUS_IH (1 << 3) -#define CR_STATUS_IL (63 << 4) -#define CR_STATUS_CRS (63 << 10) -#define CR_STATUS_PRS (63 << 16) -#define CR_STATUS_NMI (1 << 22) -#define CR_STATUS_RSIE (1 << 23) + +FIELD(CR_STATUS, PIE, 0, 1) +FIELD(CR_STATUS, U, 1, 1) +FIELD(CR_STATUS, EH, 2, 1) +FIELD(CR_STATUS, IH, 3, 1) +FIELD(CR_STATUS, IL, 4, 6) +FIELD(CR_STATUS, CRS, 10, 6) +FIELD(CR_STATUS, PRS, 16, 6) +FIELD(CR_STATUS, NMI, 22, 1) +FIELD(CR_STATUS, RSIE, 23, 1) + +#define CR_STATUS_PIE R_CR_STATUS_PIE_MASK +#define CR_STATUS_U R_CR_STATUS_U_MASK +#define CR_STATUS_EH R_CR_STATUS_EH_MASK +#define CR_STATUS_IH R_CR_STATUS_IH_MASK +#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
Add all fields; retain the helper macros for single bit fields. So far there are no uses of the multi-bit status fields. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/nios2/cpu.h | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-)