From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgvlc-0002Ka-W9 for qemu-devel@nongnu.org; Wed, 22 Oct 2014 09:16:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgvlW-0004aV-Lw for qemu-devel@nongnu.org; Wed, 22 Oct 2014 09:15:56 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:52662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgvlW-0004aR-Ek for qemu-devel@nongnu.org; Wed, 22 Oct 2014 09:15:50 -0400 Message-ID: <5447AE03.5090000@imgtec.com> Date: Wed, 22 Oct 2014 14:15:47 +0100 From: James Hogan MIME-Version: 1.0 References: <1405331763-57126-1-git-send-email-yongbok.kim@imgtec.com> <1405331763-57126-2-git-send-email-yongbok.kim@imgtec.com> In-Reply-To: <1405331763-57126-2-git-send-email-yongbok.kim@imgtec.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/20] target-mips: add MSA defines and data structure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yongbok Kim , qemu-devel@nongnu.org Cc: cristian.cuna@imgtec.com, leon.alrae@imgtec.com, aurelien@aurel32.net Hi, On 14/07/14 10:55, Yongbok Kim wrote: > +typedef struct CPUMIPSMSAContext CPUMIPSMSAContext; > +struct CPUMIPSMSAContext { > + int32_t msair; > + int32_t msacsr; > + int32_t msaaccess; > + int32_t msasave; > + int32_t msamodify; > + int32_t msarequest; > + int32_t msamap; > + int32_t msaunmap; > + > + float_status fp_status; > +}; > + > typedef union fpr_t fpr_t; > union fpr_t { > float64 fd; /* ieee double precision */ > float32 fs[2];/* ieee single precision */ > uint64_t d; /* binary double fixed-point */ > uint32_t w[2]; /* binary single fixed-point */ > +/* FPU/MSA register mapping is not tested on big-endian hosts. */ > + wr_t wr; /* vector data */ > }; > /* define FP_ENDIAN_IDX to access the same location > * in the fpr_t union regardless of the host endianness > @@ -175,6 +237,7 @@ typedef struct CPUMIPSState CPUMIPSState; > struct CPUMIPSState { > TCState active_tc; > CPUMIPSFPUContext active_fpu; > + CPUMIPSMSAContext active_msa; According to the manual, only the msair register is shared between thread contexts, each thread context has its own version of the rest of the msa registers, so most of this should be TCState I think. Cheers James