From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5wQV-0003VL-4V for qemu-devel@nongnu.org; Mon, 27 Aug 2012 06:20:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T5wQT-0007Kz-EP for qemu-devel@nongnu.org; Mon, 27 Aug 2012 06:20:11 -0400 Received: from hall.aurel32.net ([88.191.126.93]:41333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5wQT-0007Ki-8E for qemu-devel@nongnu.org; Mon, 27 Aug 2012 06:20:09 -0400 Date: Mon, 27 Aug 2012 12:20:03 +0200 From: Aurelien Jarno Message-ID: <20120827102003.GL3553@ohm.aurel32.net> References: <1333127797-8133-1-git-send-email-rth@twiddle.net> <1333127797-8133-3-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1333127797-8133-3-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Riku Voipio , qemu-devel@nongnu.org On Fri, Mar 30, 2012 at 01:16:37PM -0400, Richard Henderson wrote: > 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 > --- > 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 300d95e..ed28ca8 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) { Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net