mirror of
https://github.com/qemu/qemu.git
synced 2025-08-01 19:42:05 +00:00
Fix msr_mask.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3584 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
579a97f7ff
commit
e160c51ccd
@ -2478,7 +2478,6 @@ static inline void gen_mulxy(int x, int y)
|
|||||||
/* Return the mask of PSR bits set by a MSR instruction. */
|
/* Return the mask of PSR bits set by a MSR instruction. */
|
||||||
static uint32_t msr_mask(CPUState *env, DisasContext *s, int flags, int spsr) {
|
static uint32_t msr_mask(CPUState *env, DisasContext *s, int flags, int spsr) {
|
||||||
uint32_t mask;
|
uint32_t mask;
|
||||||
uint32_t reserved;
|
|
||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
if (flags & (1 << 0))
|
if (flags & (1 << 0))
|
||||||
@ -2493,12 +2492,12 @@ static uint32_t msr_mask(CPUState *env, DisasContext *s, int flags, int spsr) {
|
|||||||
/* Mask out undefined bits. */
|
/* Mask out undefined bits. */
|
||||||
mask &= ~CPSR_RESERVED;
|
mask &= ~CPSR_RESERVED;
|
||||||
if (!arm_feature(env, ARM_FEATURE_V6))
|
if (!arm_feature(env, ARM_FEATURE_V6))
|
||||||
reserved &= ~(CPSR_E | CPSR_GE);
|
mask &= ~(CPSR_E | CPSR_GE);
|
||||||
if (!arm_feature(env, ARM_FEATURE_THUMB2))
|
if (!arm_feature(env, ARM_FEATURE_THUMB2))
|
||||||
reserved &= ~CPSR_IT;
|
mask &= ~CPSR_IT;
|
||||||
/* Mask out execution state bits. */
|
/* Mask out execution state bits. */
|
||||||
if (!spsr)
|
if (!spsr)
|
||||||
reserved &= ~CPSR_EXEC;
|
mask &= ~CPSR_EXEC;
|
||||||
/* Mask out privileged bits. */
|
/* Mask out privileged bits. */
|
||||||
if (IS_USER(s))
|
if (IS_USER(s))
|
||||||
mask &= CPSR_USER;
|
mask &= CPSR_USER;
|
||||||
|
Loading…
Reference in New Issue
Block a user