From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcHEN-0001Zl-VZ for qemu-devel@nongnu.org; Wed, 16 Sep 2015 14:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcHEK-00018M-QJ for qemu-devel@nongnu.org; Wed, 16 Sep 2015 14:14:55 -0400 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:35691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcHEK-00018C-KR for qemu-devel@nongnu.org; Wed, 16 Sep 2015 14:14:52 -0400 Received: by qgt47 with SMTP id 47so178667037qgt.2 for ; Wed, 16 Sep 2015 11:14:51 -0700 (PDT) Sender: Richard Henderson References: <1442234754-15692-1-git-send-email-leon.alrae@imgtec.com> <1442234754-15692-3-git-send-email-leon.alrae@imgtec.com> From: Richard Henderson Message-ID: <55F9B198.3070708@twiddle.net> Date: Wed, 16 Sep 2015 11:14:48 -0700 MIME-Version: 1.0 In-Reply-To: <1442234754-15692-3-git-send-email-leon.alrae@imgtec.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips: remove gen_mfc0_load64() and use tcg_gen_ld32s_tl() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae , qemu-devel@nongnu.org Cc: aurelien@aurel32.net On 09/14/2015 05:45 AM, Leon Alrae wrote: > -static inline void gen_mfc0_load64 (TCGv arg, target_ulong off) > -{ > - tcg_gen_ld_tl(arg, cpu_env, off); > - tcg_gen_ext32s_tl(arg, arg); > -} > - > static inline void gen_mtc0_store32 (TCGv arg, target_ulong off) > { > TCGv_i32 t0 = tcg_temp_new_i32(); > @@ -4972,17 +4966,19 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) > break; > case 4: > CP0_CHECK(ctx->insn_flags & ASE_MT); > - gen_mfc0_load64(arg, offsetof(CPUMIPSState, CP0_YQMask)); > + tcg_gen_ld32s_tl(arg, cpu_env, offsetof(CPUMIPSState, CP0_YQMask)); > rn = "YQMask"; > break; This change is broken for 64-bit guest and big-endian host -- one has to adjust the offset in that case. I suspect that's why the extension was separate to begin with... r~