From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewZ5G-00030N-Fb for qemu-devel@nongnu.org; Thu, 15 Mar 2018 16:02:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewZ5D-0006Gt-D4 for qemu-devel@nongnu.org; Thu, 15 Mar 2018 16:02:42 -0400 Received: from mail-pl0-x230.google.com ([2607:f8b0:400e:c01::230]:43989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewZ5D-0006GE-6B for qemu-devel@nongnu.org; Thu, 15 Mar 2018 16:02:39 -0400 Received: by mail-pl0-x230.google.com with SMTP id f23-v6so4434162plr.10 for ; Thu, 15 Mar 2018 13:02:39 -0700 (PDT) References: <871sgwmcc3.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> From: Richard Henderson Message-ID: Date: Fri, 16 Mar 2018 04:02:33 +0800 MIME-Version: 1.0 In-Reply-To: <871sgwmcc3.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Using new TCG Vector infrastructure in PowerPC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania , qemu-devel@nongnu.org On 03/07/2018 06:03 PM, Nikunj A Dadhania wrote: > Hi Richard, > > I was working to get TCG vector support for PowerPC[1]. Started with > converting logical operations like vector AND/OR/XOR and compare > instructions. Found some inconsistency during my testing on x86 laptop > emulating PowerPC: Great. Well, the problem is that you cannot use TCG generic vectors and TCG global variables to access the same memory. Thus your first step must be to remove all references to cpu_avrh and cpu_avrl. These can be replaced by translator helpers that perform an explicit tcg_gen_ld_i64 or tcg_gen_st_i64 to the proper memory locations. Only after that's done can you begin converting other references to use the host vectors. Otherwise, the tcg optimizer will do Bad and Unpredictable Things, which may well have produced the incorrect results that you saw. I'll note that it's probably worth rearranging all of {fpr,vsr,avr} to the more logical configuration presented by Power7 (?) such that it's one array of 64 x 128-bit registers. r~