mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/aurel/tags/pull-target-sh4-20171218' into staging
Queued target/sh4 patches # gpg: Signature made Mon 18 Dec 2017 22:36:42 GMT # gpg: using RSA key 0x1388C0F899E8336B # gpg: Good signature from "Aurelien Jarno <aurelien@aurel32.net>" # gpg: aka "Aurelien Jarno <aurelien@jarno.fr>" # gpg: aka "Aurelien Jarno <aurel32@debian.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 7746 2642 A9EF 94FD 0F77 196D BA9C 7806 1DDD 8C9B # Subkey fingerprint: 52BC 8695 BE34 F90A D7D4 0CB8 1388 C0F8 99E8 336B * remotes/aurel/tags/pull-target-sh4-20171218: target/sh4: Convert to DisasContextBase target/sh4: Do not singlestep after exceptions target/sh4: Convert to DisasJumpType target/sh4: Use cmpxchg for movco when parallel_cpus target/sh4: fix TCG leak during gusa sequence target/sh4: add missing tcg_temp_free() in _decode_opc() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+15
-4
@@ -2679,6 +2679,8 @@ void cpu_loop(CPUSH4State *env)
|
||||
target_siginfo_t info;
|
||||
|
||||
while (1) {
|
||||
bool arch_interrupt = true;
|
||||
|
||||
cpu_exec_start(cs);
|
||||
trapnr = cpu_exec(cs);
|
||||
cpu_exec_end(cs);
|
||||
@@ -2710,13 +2712,14 @@ void cpu_loop(CPUSH4State *env)
|
||||
int sig;
|
||||
|
||||
sig = gdb_handlesig(cs, TARGET_SIGTRAP);
|
||||
if (sig)
|
||||
{
|
||||
if (sig) {
|
||||
info.si_signo = sig;
|
||||
info.si_errno = 0;
|
||||
info.si_code = TARGET_TRAP_BRKPT;
|
||||
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
|
||||
}
|
||||
} else {
|
||||
arch_interrupt = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0xa0:
|
||||
@@ -2727,9 +2730,9 @@ void cpu_loop(CPUSH4State *env)
|
||||
info._sifields._sigfault._addr = env->tea;
|
||||
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
|
||||
break;
|
||||
|
||||
case EXCP_ATOMIC:
|
||||
cpu_exec_step_atomic(cs);
|
||||
arch_interrupt = false;
|
||||
break;
|
||||
default:
|
||||
printf ("Unhandled trap: 0x%x\n", trapnr);
|
||||
@@ -2737,6 +2740,14 @@ void cpu_loop(CPUSH4State *env)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
process_pending_signals (env);
|
||||
|
||||
/* Most of the traps imply an exception or interrupt, which
|
||||
implies an REI instruction has been executed. Which means
|
||||
that LDST (aka LOK_ADDR) should be cleared. But there are
|
||||
a few exceptions for traps internal to QEMU. */
|
||||
if (arch_interrupt) {
|
||||
env->lock_addr = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -188,7 +188,9 @@ typedef struct CPUSH4State {
|
||||
tlb_t itlb[ITLB_SIZE]; /* instruction translation table */
|
||||
tlb_t utlb[UTLB_SIZE]; /* unified translation table */
|
||||
|
||||
uint32_t ldst;
|
||||
/* LDST = LOCK_ADDR != -1. */
|
||||
uint32_t lock_addr;
|
||||
uint32_t lock_value;
|
||||
|
||||
/* Fields up to this point are cleared by a CPU reset */
|
||||
struct {} end_reset_fields;
|
||||
|
||||
@@ -171,6 +171,7 @@ void superh_cpu_do_interrupt(CPUState *cs)
|
||||
env->spc = env->pc;
|
||||
env->sgr = env->gregs[15];
|
||||
env->sr |= (1u << SR_BL) | (1u << SR_MD) | (1u << SR_RB);
|
||||
env->lock_addr = -1;
|
||||
|
||||
if (env->flags & DELAY_SLOT_MASK) {
|
||||
/* Branch instruction should be executed again before delay slot. */
|
||||
|
||||
+155
-118
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user