From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmGuI-0002f5-OB for qemu-devel@nongnu.org; Thu, 06 Nov 2014 01:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmGu9-0000F9-Gs for qemu-devel@nongnu.org; Thu, 06 Nov 2014 01:50:58 -0500 Received: from mail-la0-x229.google.com ([2a00:1450:4010:c03::229]:51344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmGu9-0000Ez-6E for qemu-devel@nongnu.org; Thu, 06 Nov 2014 01:50:49 -0500 Received: by mail-la0-f41.google.com with SMTP id s18so2042665lam.14 for ; Wed, 05 Nov 2014 22:50:47 -0800 (PST) Sender: Richard Henderson Message-ID: <545A602F.9080508@twiddle.net> Date: Wed, 05 Nov 2014 18:36:47 +0100 From: Richard Henderson MIME-Version: 1.0 References: <1414546928-54642-1-git-send-email-yongbok.kim@imgtec.com> <1414546928-54642-8-git-send-email-yongbok.kim@imgtec.com> In-Reply-To: <1414546928-54642-8-git-send-email-yongbok.kim@imgtec.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 07/20] target-mips: add msa_reset(), global msa register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yongbok Kim , qemu-devel@nongnu.org Cc: leon.alrae@imgtec.com, aurelien@aurel32.net On 10/29/2014 02:41 AM, Yongbok Kim wrote: > + for (i = 0; i < 32; i++) { > + int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]); > + msa_wr_d[i * 2] = > + tcg_global_mem_new_i64(TCG_AREG0, off, msaregnames[i * 2]); > + off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[1]); > + msa_wr_d[i * 2 + 1] = > + tcg_global_mem_new_i64(TCG_AREG0, off, msaregnames[i * 2 + 1]); > + } > + You've got to be extremely careful here, since now you have two TCG registers covering the same data -- the msa register you define here and the fpu_f64 register. You can get away with this ONLY if you never use both within the same TB. And I strongly suspect you're not going to do that. You're planning to use msa_wr for msa insns and fpu_f64 with fpu insns because it "seems right". r~