[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] mips-linux-user: Always support rdhwr.
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 2/3] mips-linux-user: Always support rdhwr. |
Date: |
Sat, 17 Dec 2011 14:21:45 -0800 |
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 <address@hidden>
---
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 b20a817..e2ee763 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -8118,7 +8118,11 @@ gen_rdhwr (CPUState *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) {
--
1.7.7.4