qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 04/13] target/openrisc: Make VR and PPC read-only
Date: Wed,  4 Sep 2019 13:44:58 -0700	[thread overview]
Message-ID: <20190904204507.32457-5-richard.henderson@linaro.org> (raw)
In-Reply-To: <20190904204507.32457-1-richard.henderson@linaro.org>

These SPRs are read-only.  The writes can simply be ignored,
as we already do for other read-only (or missing) registers.
There is no reason to mask the value in env->vr.

Reviewed-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/openrisc/cpu.h        |  3 ---
 target/openrisc/sys_helper.c | 10 +---------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h
index 561f0f7fad..755282f95d 100644
--- a/target/openrisc/cpu.h
+++ b/target/openrisc/cpu.h
@@ -68,9 +68,6 @@ enum {
                                       (reg) |= ((v & 0x1f) << 2);\
                                   } while (0)
 
-/* Version Register */
-#define SPR_VR 0xFFFF003F
-
 /* Interrupt */
 #define NR_IRQS  32
 
diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
index 1053409a04..d20f48b659 100644
--- a/target/openrisc/sys_helper.c
+++ b/target/openrisc/sys_helper.c
@@ -39,10 +39,6 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb)
     int idx;
 
     switch (spr) {
-    case TO_SPR(0, 0): /* VR */
-        env->vr = rb;
-        break;
-
     case TO_SPR(0, 11): /* EVBAR */
         env->evbar = rb;
         break;
@@ -62,10 +58,6 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb)
         cpu_set_sr(env, rb);
         break;
 
-    case TO_SPR(0, 18): /* PPC */
-        env->ppc = rb;
-        break;
-
     case TO_SPR(0, 32): /* EPCR */
         env->epcr = rb;
         break;
@@ -204,7 +196,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, target_ulong rd,
 
     switch (spr) {
     case TO_SPR(0, 0): /* VR */
-        return env->vr & SPR_VR;
+        return env->vr;
 
     case TO_SPR(0, 1): /* UPR */
         return env->upr;    /* TT, DM, IM, UP present */
-- 
2.17.1



  parent reply	other threads:[~2019-09-04 21:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 20:44 [Qemu-devel] [PULL 00/13] target/openrisc updates Richard Henderson
2019-09-04 20:44 ` [Qemu-devel] [PULL 01/13] target/openrisc: Add DisasContext parameter to check_r0_write Richard Henderson
2019-09-04 20:44 ` [Qemu-devel] [PULL 02/13] target/openrisc: Replace cpu register array with a function Richard Henderson
2019-09-04 20:44 ` [Qemu-devel] [PULL 03/13] target/openrisc: Cache R0 in DisasContext Richard Henderson
2019-09-04 20:44 ` Richard Henderson [this message]
2019-09-04 20:44 ` [Qemu-devel] [PULL 05/13] target/openrisc: Move VR, UPR, DMMCFGR, IMMCFGR to cpu init Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 06/13] target/openrisc: Add VR2 and AVR special processor registers Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 07/13] target/openrisc: Fix lf.ftoi.s Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 08/13] target/openrisc: Check CPUCFG_OF32S for float insns Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 09/13] target/openrisc: Add support for ORFPX64A32 Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 10/13] target/openrisc: Implement unordered fp comparisons Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 11/13] target/openrisc: Implement move to/from FPCSR Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 12/13] target/openrisc: Implement l.adrp Richard Henderson
2019-09-04 20:45 ` [Qemu-devel] [PULL 13/13] target/openrisc: Update cpu "any" to v1.3 Richard Henderson
2019-09-05  9:25 ` [Qemu-devel] [PULL 00/13] target/openrisc updates Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190904204507.32457-5-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).