[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/13] linux-user/sparc: Use WREG constants in sparc
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 06/13] linux-user/sparc: Use WREG constants in sparc/target_cpu.h |
Date: |
Sun, 19 May 2019 13:19:46 -0700 |
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.
Note that the kernel legitimately uses the name "FP", because it
utilizes the rolled stack window in processing the system call.
Signed-off-by: Richard Henderson <address@hidden>
---
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 52c9d8c7db..2c80db4889 100644
--- a/linux-user/sparc/target_cpu.h
+++ b/linux-user/sparc/target_cpu.h
@@ -45,15 +45,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
- [Qemu-devel] [PATCH 00/13] linux-user: path, clone, sparc, shmat fixes, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 01/13] util/path: Do not cache all filenames at startup, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 04/13] linux-user/alpha: Set r20 secondary return value, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 02/13] linux-user: Rename cpu_clone_regs to cpu_clone_regs_child, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 03/13] linux-user: Introduce cpu_clone_regs_parent, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 06/13] linux-user/sparc: Use WREG constants in sparc/target_cpu.h,
Richard Henderson <=
- [Qemu-devel] [PATCH 05/13] target/sparc: Define an enumeration for accessing env->regwptr, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 08/13] linux-user/sparc: Fix cpu_clone_regs, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 11/13] tests/tcg/multiarch/linux-test: Fix error check for shmat, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 07/13] linux-user/sparc: Use WREG constants in sparc/signal.c, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 09/13] linux-user/sparc: Flush register windows before clone/fork/vfork, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 10/13] scripts/qemu-binfmt-conf: Update for sparc64, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 12/13] linux-user: Fix shmat emulation by honoring host SHMLBA, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH 13/13] linux-user: Align mmap_find_vma to host page size, Richard Henderson, 2019/05/19