Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69D1DC48BD6 for ; Wed, 26 Jun 2019 19:41:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36C862085A for ; Wed, 26 Jun 2019 19:41:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36C862085A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ilande.co.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgDnf-00016Z-I2 for qemu-devel@archiver.kernel.org; Wed, 26 Jun 2019 15:41:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58168) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgDl2-0007jp-Ad for qemu-devel@nongnu.org; Wed, 26 Jun 2019 15:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgDl1-0000sI-7z for qemu-devel@nongnu.org; Wed, 26 Jun 2019 15:39:04 -0400 Received: from mail.ilande.co.uk ([46.43.2.167]:34486 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgDl1-0000rH-1K for qemu-devel@nongnu.org; Wed, 26 Jun 2019 15:39:03 -0400 Received: from host86-173-229-95.range86-173.btcentralplus.com ([86.173.229.95] helo=[192.168.1.65]) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hgDkX-0003Br-IW; Wed, 26 Jun 2019 20:38:33 +0100 To: Richard Henderson , Aleksandar Markovic References: <20190519041522.12327-1-richard.henderson@linaro.org> <8f28d008-2608-a579-7505-4546b08deb41@linaro.org> <085d6881-f518-9888-a13e-081cdc09de46@ilande.co.uk> <0b9f4772-37f6-1453-e4ea-5ad9d0f52a5b@ilande.co.uk> <68facefc-b801-4902-11c0-4542662bfc4e@linaro.org> <16f26b7f-2435-aa05-66a3-073e8310d5c8@linaro.org> <0ceec012-fcdc-ccde-291a-121a4e475f86@ilande.co.uk> <7b1699e1-28ca-a58f-787e-c0ca11666b90@linaro.org> From: Mark Cave-Ayland Openpgp: preference=signencrypt Autocrypt: addr=mark.cave-ayland@ilande.co.uk; keydata= mQENBFQJuzwBCADAYvxrwUh1p/PvUlNFwKosVtVHHplgWi5p29t58QlOUkceZG0DBYSNqk93 3JzBTbtd4JfFcSupo6MNNOrCzdCbCjZ64ik8ycaUOSzK2tKbeQLEXzXoaDL1Y7vuVO7nL9bG E5Ru3wkhCFc7SkoypIoAUqz8EtiB6T89/D9TDEyjdXUacc53R5gu8wEWiMg5MQQuGwzbQy9n PFI+mXC7AaEUqBVc2lBQVpAYXkN0EyqNNT12UfDLdxaxaFpUAE2pCa2LTyo5vn5hEW+i3VdN PkmjyPvL6DdY03fvC01PyY8zaw+UI94QqjlrDisHpUH40IUPpC/NB0LwzL2aQOMkzT2NABEB AAG0ME1hcmsgQ2F2ZS1BeWxhbmQgPG1hcmsuY2F2ZS1heWxhbmRAaWxhbmRlLmNvLnVrPokB OAQTAQIAIgUCVAm7PAIbAwYLCQgHAwI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VR8e0tMKvxzFBWzrWX1mzljbBlnV2n8BIwVXWNbgwpHSsj imgcU9TTGC5qd9g= Message-ID: <9502af13-22b9-031e-2ba9-ec4ff75ccd0e@ilande.co.uk> Date: Wed, 26 Jun 2019 20:38:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <7b1699e1-28ca-a58f-787e-c0ca11666b90@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 86.173.229.95 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.43.2.167 Subject: Re: [Qemu-devel] [PATCH v4 0/7] tcg/ppc: Add vector opcodes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gibson , QEMU Developers , Howard Spoelstra Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 26/06/2019 19:42, Richard Henderson wrote: > On 6/26/19 7:00 PM, Mark Cave-Ayland wrote: >> Interestingly if I set a trap and then switch the opcode to "lis r4,0" (0x3c800000) >> then we carry on as normal until the next "lis r2,0" instruction. Looking through the >> whole output of -d out_asm this is the first mention of r2 which makes me wonder if >> it is special somehow? At least a quick search indicates that for 32-bit PPC r2 is >> supposed to be dedicated as a TOC pointer. >> >> Is there a quick way to disable r2 from the list of available registers to see if >> that gets things going? > > Interesting. I'm not sure why that's happening. > > As a quick hack, > > > /* For some memory operations, we need a scratch that isn't R0. For the AIX > calling convention, we can re-use the TOC register since we'll be reloading > it at every call. Otherwise R12 will do nicely as neither a call-saved > register nor a parameter register. */ > - #ifdef _CALL_AIX > + #if 0 > # define TCG_REG_TMP1 TCG_REG_R2 > #else > # define TCG_REG_TMP1 TCG_REG_R12 > #endif > > > But I thought that _CALL_AIX was only defined for ppc64 elf version 1. I > thought that ppc32 used _CALL_SYSV instead. Certainly that's what is used > elsewhere... No, that didn't work either. I've confirmed using #ifdef _CALL_AIX #error ERROR #endif that _CALL_AIX is *NOT* defined and _CALL_SYSV *is* defined. I've also tried removing TCG_REG_R2 from tcg_target_reg_alloc_order[] and tcg_regset_set_reg() for TCG_REG_R2 from tcg_target_init() and I'm still generating bad code that writes to r2(!). Since I can't find any other mentions of TCG_REG_TMP1 and TCG_REG_R2 that isn't inside an #ifdef _CALL_AIX ... #endif section I'm starting to get stuck. Is there any chance that the R_PPC_ADDR32 change could be causing this at all? ATB, Mark.