qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [Qemu-devel] [PATCH v2 4/8] linux-user/sparc: Use WREG constants in sparc/target_cpu.h
Date: Thu,  9 May 2019 20:27:06 -0700	[thread overview]
Message-ID: <20190510032710.23910-5-richard.henderson@linaro.org> (raw)
In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org>

This fixes a naming bug wherein we used "UREG_FP" to access the
stack pointer.  OTOH, the "UREG_FP" constant was also defined
incorrectly such that it *did* reference the stack pointer.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/sparc/target_cpu.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h
index a92748cae3..567351d564 100644
--- a/linux-user/sparc/target_cpu.h
+++ b/linux-user/sparc/target_cpu.h
@@ -42,15 +42,9 @@ static inline void cpu_set_tls(CPUSPARCState *env, target_ulong newtls)
     env->gregs[7] = newtls;
 }
 
-#ifndef UREG_I6
-#define UREG_I6        6
-#endif
-#ifndef UREG_FP
-#define UREG_FP        UREG_I6
-#endif
-
 static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state)
 {
-    return state->regwptr[UREG_FP];
+    return state->regwptr[WREG_SP];
 }
+
 #endif
-- 
2.17.1



  parent reply	other threads:[~2019-05-10  3:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10  3:27 [Qemu-devel] [PATCH v2 0/8] linux-user sparc fixes Richard Henderson
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 1/8] linux-user: Disallow setting newsp for fork Richard Henderson
2019-05-15  0:31   ` Richard Henderson
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 2/8] linux-user: Pass the parent env to cpu_clone_regs Richard Henderson
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 3/8] target/sparc: Define an enumeration for accessing env->regwptr Richard Henderson
2019-05-15  5:44   ` Philippe Mathieu-Daudé
2019-05-20  3:09     ` Richard Henderson
2019-05-10  3:27 ` Richard Henderson [this message]
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 5/8] linux-user/sparc: Use WREG constants in sparc/signal.c Richard Henderson
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 6/8] linux-user/sparc: Fix cpu_clone_regs Richard Henderson
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 7/8] linux-user/sparc: Flush register windows before clone Richard Henderson
2019-05-10  3:27 ` [Qemu-devel] [PATCH v2 8/8] scripts/qemu-binfmt-conf: Update for sparc64 Richard Henderson

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=20190510032710.23910-5-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --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).