From: Richard Henderson Date: Fri, 30 Mar 2012 17:16:37 +0000 (-0400) Subject: mips-linux-user: Always support rdhwr. X-Git-Tag: v1.1.2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d45ae83523ae29fc05c6a3f7af3d863e3af18e7;p=thirdparty%2Fqemu.git 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 Cc: Riku Voipio Signed-off-by: Aurelien Jarno (cherry picked from commit b3167288367f79754b74ad933146e37938ebff13) Signed-off-by: Michael Roth --- diff --git a/target-mips/translate.c b/target-mips/translate.c index cb6077d8066..1f1d434885b 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) {