Skip to content

Commit

Permalink
mips-linux-user: Always support rdhwr.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 authored and aurel32 committed Aug 27, 2012
1 parent 0516867 commit b316728
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target-mips/translate.c
Expand Up @@ -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) {
Expand Down

0 comments on commit b316728

Please sign in to comment.