aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-04-28 12:33:56 -0700
committerLaurent Vivier <laurent@vivier.eu>2021-05-15 21:44:38 +0200
commit915c69dc029e0fe509f8e4870993977068b66eaf (patch)
tree8287a83ffcf37db23166176f6f68c85ca1a9b6a5 /linux-user
parentcb1f198296dd9d7787328eab5beb2e31f550ba63 (diff)
downloadqemu-915c69dc029e0fe509f8e4870993977068b66eaf.zip
qemu-915c69dc029e0fe509f8e4870993977068b66eaf.tar.gz
qemu-915c69dc029e0fe509f8e4870993977068b66eaf.tar.bz2
linux-user/s390x: Remove PSW_ADDR_AMODE
This is an unnecessary complication since we only support 64-bit mode. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-4-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/s390x/signal.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
index fece8ab..1dfca71 100644
--- a/linux-user/s390x/signal.c
+++ b/linux-user/s390x/signal.c
@@ -31,7 +31,6 @@
#define _SIGCONTEXT_NSIG_BPW 64 /* FIXME: 31-bit mode -> 32 */
#define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
#define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
-#define PSW_ADDR_AMODE 0x0000000000000000UL /* 0x80000000UL for 31-bit */
#define S390_SYSCALL_OPCODE ((uint16_t)0x0a00)
typedef struct {
@@ -148,11 +147,9 @@ void setup_frame(int sig, struct target_sigaction *ka,
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
if (ka->sa_flags & TARGET_SA_RESTORER) {
- env->regs[14] = (unsigned long)
- ka->sa_restorer | PSW_ADDR_AMODE;
+ env->regs[14] = ka->sa_restorer;
} else {
- env->regs[14] = (frame_addr + offsetof(sigframe, retcode))
- | PSW_ADDR_AMODE;
+ env->regs[14] = frame_addr + offsetof(sigframe, retcode);
__put_user(S390_SYSCALL_OPCODE | TARGET_NR_sigreturn,
&frame->retcode);
}
@@ -162,7 +159,7 @@ void setup_frame(int sig, struct target_sigaction *ka,
/* Set up registers for signal handler */
env->regs[15] = frame_addr;
- env->psw.addr = (target_ulong) ka->_sa_handler | PSW_ADDR_AMODE;
+ env->psw.addr = ka->_sa_handler;
env->regs[2] = sig; //map_signal(sig);
env->regs[3] = frame_addr += offsetof(typeof(*frame), sc);
@@ -210,10 +207,9 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
if (ka->sa_flags & TARGET_SA_RESTORER) {
- env->regs[14] = ka->sa_restorer | PSW_ADDR_AMODE;
+ env->regs[14] = ka->sa_restorer;
} else {
- env->regs[14] = (frame_addr + offsetof(typeof(*frame), retcode))
- | PSW_ADDR_AMODE;
+ env->regs[14] = frame_addr + offsetof(typeof(*frame), retcode);
__put_user(S390_SYSCALL_OPCODE | TARGET_NR_rt_sigreturn,
&frame->retcode);
}
@@ -223,7 +219,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
/* Set up registers for signal handler */
env->regs[15] = frame_addr;
- env->psw.addr = (target_ulong) ka->_sa_handler | PSW_ADDR_AMODE;
+ env->psw.addr = ka->_sa_handler;
env->regs[2] = sig; //map_signal(sig);
env->regs[3] = frame_addr + offsetof(typeof(*frame), info);
@@ -248,7 +244,6 @@ restore_sigregs(CPUS390XState *env, target_sigregs *sc)
trace_user_s390x_restore_sigregs(env, (unsigned long long)sc->regs.psw.addr,
(unsigned long long)env->psw.addr);
__get_user(env->psw.addr, &sc->regs.psw.addr);
- /* FIXME: 31-bit -> | PSW_ADDR_AMODE */
for (i = 0; i < 16; i++) {
__get_user(env->aregs[i], &sc->regs.acrs[i]);