mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 10:45:28 +00:00
target/arm: Support EL0 v7m msr/mrs for CONFIG_USER_ONLY
Simply moving the non-stub helper_v7m_mrs/msr outside of !CONFIG_USER_ONLY is not an option, because of all of the other system-mode helpers that are called. But we can split out a few subroutines to handle the few EL0 accessible registers without duplicating code. Backports commit 04c9c81b8fa2ee33f59a26265700fae6fc646062 from qemu
This commit is contained in:
parent
df5929cb69
commit
f2ec6bc22d
|
@ -1236,6 +1236,7 @@ static inline void xpsr_write(CPUARMState *env, uint32_t val, uint32_t mask)
|
||||||
if (mask & XPSR_GE) {
|
if (mask & XPSR_GE) {
|
||||||
env->GE = (val & XPSR_GE) >> 16;
|
env->GE = (val & XPSR_GE) >> 16;
|
||||||
}
|
}
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
if (mask & XPSR_T) {
|
if (mask & XPSR_T) {
|
||||||
env->thumb = ((val & XPSR_T) != 0);
|
env->thumb = ((val & XPSR_T) != 0);
|
||||||
}
|
}
|
||||||
|
@ -1251,6 +1252,7 @@ static inline void xpsr_write(CPUARMState *env, uint32_t val, uint32_t mask)
|
||||||
/* Note that this only happens on exception exit */
|
/* Note that this only happens on exception exit */
|
||||||
write_v7m_exception(env, val & XPSR_EXCP);
|
write_v7m_exception(env, val & XPSR_EXCP);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HCR_VM (1ULL << 0)
|
#define HCR_VM (1ULL << 0)
|
||||||
|
|
Loading…
Reference in a new issue