]> git.proxmox.com Git - qemu.git/commitdiff
mips-linux-user: Always support rdhwr.
authorRichard Henderson <rth@twiddle.net>
Fri, 30 Mar 2012 17:16:37 +0000 (13:16 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 28 Aug 2012 06:50:03 +0000 (01:50 -0500)
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>
(cherry picked from commit b3167288367f79754b74ad933146e37938ebff13)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-mips/translate.c

index cb6077d8066b6ded3fe57db772e49359d6a85fad..1f1d434885b905462769eaa5fc89b5f51660620e 100644 (file)
@@ -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) {