From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XguC9-0002uO-GL for qemu-devel@nongnu.org; Wed, 22 Oct 2014 07:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XguC3-00037X-Bp for qemu-devel@nongnu.org; Wed, 22 Oct 2014 07:35:13 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:30758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XguC3-000318-71 for qemu-devel@nongnu.org; Wed, 22 Oct 2014 07:35:07 -0400 Message-ID: <54479666.8070506@imgtec.com> Date: Wed, 22 Oct 2014 12:35:02 +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: > +union wr_t { > + int8_t b[MSA_WRLEN/8]; > + int16_t h[MSA_WRLEN/16]; > + int32_t w[MSA_WRLEN/32]; > + int64_t d[MSA_WRLEN/64]; This is incorrect on a big endian host. The least significant bits of the lowest indexed element should always alias. With a compiler for little endian this will work fine since b[0] will alias the least significant bits of h[0], w[0], and d[0], whereas with a compiler for big endian, b[0] will alias the upper byte of h[0], w[0], and d[0]. > diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h > index 9dfa516..11722bb 100644 > --- a/target-mips/mips-defs.h > +++ b/target-mips/mips-defs.h > @@ -41,6 +41,7 @@ > #define ASE_MT 0x00020000 > #define ASE_SMARTMIPS 0x00040000 > #define ASE_MICROMIPS 0x00080000 > +#define ASE_MSA 0x00100000 inconsistent whitespace... though maybe it was already incorrect. Cheers James