diff options
author | Richard Henderson <rth@twiddle.net> | 2012-03-30 13:16:37 -0400 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2012-08-27 12:17:40 +0200 |
commit | b3167288367f79754b74ad933146e37938ebff13 (patch) | |
tree | aac3474fb8f0459386980fb344d0af09dedafea5 /target-mips | |
parent | 05168674505153a641c7bfddb691d2eda11d13d1 (diff) | |
download | hqemu-b3167288367f79754b74ad933146e37938ebff13.zip hqemu-b3167288367f79754b74ad933146e37938ebff13.tar.gz |
mips-linux-user: Always support rdhwr.
The kernel will emulate this instruction if it's not supported
natively. This insn is used for TLS, among other things, and
so is required by modern glibc.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-mips')
-rw-r--r-- | target-mips/translate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index f740a08..35624e9 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -8111,7 +8111,11 @@ gen_rdhwr (CPUMIPSState *env, DisasContext *ctx, int rt, int rd) { TCGv t0; +#if !defined(CONFIG_USER_ONLY) + /* The Linux kernel will emulate rdhwr if it's not supported natively. + Therefore only check the ISA in system mode. */ check_insn(env, ctx, ISA_MIPS32R2); +#endif t0 = tcg_temp_new(); switch (rd) { |