diff options
author | Bhanu Chetlapalli <bhanu@mips.com> | 2012-01-31 16:26:04 -0800 |
---|---|---|
committer | Bhanu Chetlapalli <bhanu@mips.com> | 2012-01-31 16:51:37 -0800 |
commit | 325e19d19ff9e1fc9c6acb12eeb754563fc2e251 (patch) | |
tree | a7cfa3b5eb666b9aefac8f8d38f2d6fe6dc92164 /target-mips/cpu.h | |
parent | 409c7b66435cf5947cab6bf0710f92507317f22e (diff) | |
download | external_qemu-325e19d19ff9e1fc9c6acb12eeb754563fc2e251.zip external_qemu-325e19d19ff9e1fc9c6acb12eeb754563fc2e251.tar.gz external_qemu-325e19d19ff9e1fc9c6acb12eeb754563fc2e251.tar.bz2 |
[MIPS] Tweak MIPS support to work in Android qemu framework
Change-Id: Icd617cb91fe87a6f88566dd57b6405b216ca3570
Signed-off-by: Chris Dearman <chris@mips.com>
Diffstat (limited to 'target-mips/cpu.h')
-rw-r--r-- | target-mips/cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 89c28f1..27bdc95 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -500,6 +500,16 @@ static inline int cpu_mmu_index (CPUState *env) return env->hflags & MIPS_HFLAG_KSU; } +static inline int is_cpu_user (CPUState *env) +{ +#ifdef CONFIG_USER_ONLY + return 1; +#else + return ((env->CP0_Status & + ((3 << CP0St_KSU) | (1 << CP0St_ERL) | (1 << CP0St_EXL))) == (3 << CP0St_KSU)); +#endif // CONFIG_USER_ONLY +} + static inline void cpu_clone_regs(CPUState *env, target_ulong newsp) { if (newsp) |