mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 18:16:19 +00:00
c7b5fccfb8
In the v7M architecture, there is an invariant that if the CPU is in Handler mode then the CONTROL.SPSEL bit cannot be nonzero. This in turn means that the current stack pointer is always indicated by CONTROL.SPSEL, even though Handler mode always uses the Main stack pointer. In v8M, this invariant is removed, and CONTROL.SPSEL may now be nonzero in Handler mode (though Handler mode still always uses the Main stack pointer). In preparation for this change, change how we handle this bit: rename switch_v7m_sp() to the now more accurate write_v7m_control_spsel(), and make it check both the handler mode state and the SPSEL bit. Note that this implicitly changes the point at which we switch active SP on exception exit from before we pop the exception frame to after it. Backports commit de2db7ec894f11931932ca78cd14a8d2b1389d5b from qemu |
||
---|---|---|
.. | ||
accel | ||
crypto | ||
default-configs | ||
docs | ||
fpu | ||
hw | ||
include | ||
qapi | ||
qobject | ||
qom | ||
scripts | ||
target | ||
tcg | ||
util | ||
aarch64.h | ||
aarch64eb.h | ||
accel.c | ||
arm.h | ||
armeb.h | ||
atomic_template.h | ||
CODING_STYLE | ||
configure | ||
COPYING | ||
COPYING.LIB | ||
cpu-exec-common.c | ||
cpu-exec.c | ||
cpus.c | ||
cputlb.c | ||
exec.c | ||
gen_all_header.sh | ||
glib_compat.c | ||
HACKING | ||
header_gen.py | ||
ioport.c | ||
LICENSE | ||
m68k.h | ||
Makefile | ||
Makefile.objs | ||
Makefile.target | ||
memory.c | ||
memory_ldst.inc.c | ||
memory_mapping.c | ||
mips.h | ||
mips64.h | ||
mips64el.h | ||
mipsel.h | ||
powerpc.h | ||
qapi-schema.json | ||
qemu-timer.c | ||
rules.mak | ||
softmmu_template.h | ||
sparc.h | ||
sparc64.h | ||
tcg-runtime.c | ||
translate-all.c | ||
translate-all.h | ||
translate-common.c | ||
unicorn_common.h | ||
VERSION | ||
vl.c | ||
vl.h | ||
x86_64.h |