Message ID | 20230120073913.1028407-35-alistair.francis@opensource.wdc.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp646284pvb; Thu, 19 Jan 2023 23:47:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXsf2HInPljhLwR3Ovap0gb02tGSg97OcERGEC811JrvSXo2+G9xOo/pDDGNQa/r6sfhgmeq X-Received: by 2002:ad4:4983:0:b0:534:9c81:2c15 with SMTP id u3-20020ad44983000000b005349c812c15mr19435843qvx.3.1674200869802; Thu, 19 Jan 2023 23:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674200869; cv=none; d=google.com; s=arc-20160816; b=ITgLZOl3PqdH1SL2KicIo2k5HdpsLYvE9K5Zc23Duhq1UbFoEJWtsVQd4d3AXctUJt COs+guPf6GzLYj81Samfs5axyKi3dQ2+T6EfvCMAOsgo6bbUC3Ak838eCE/JvfoQcuMx 7mFakTpGAJutGxoGM9S8DtS1eLf+QflZd+KUD5Yc8YFQIYLMgm0hCyrtmlXxRfoSENfh CDGWha2CRdbdAtcSlBd/bGO39WWlaXrBVK0+87/QeZwVFKKGdQ2A22SQjDDAPfnQyYHI 9Fl218mWkuT2EdgkAcCBTATdBSs6aSQTUAGNvAvyv9Dmws07SiTaYE9SnDdDMpLZHzaa 2brw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:wdcironportexception:ironport-sdr:ironport-sdr :dkim-signature; bh=8PeYL7B3y7Yju7ziUrwhoeaF0RHocxel9X/S+xTtAtM=; b=i0PI/Rl5dfIHcchd4BAzHtSPRMauM/N4HDpJaPcfKJCHxUaF3Uim6flC9S+rH4A+Cd IboRuK7kc2fMMCWjyP6cVrQ7qQpwZCWgy67sumO9+YpO/nAZyXaDhAOt3h7LoKb61raV XxD4BHcVsfcWLvaZxAfS/OnnKUIjcC8k3IylTXY83guGx17fn46K21iL6x2Ww2NeuYaa GKP67kO6RqeRkBK8AZ6TjLNtpEjfDJtRTvPPuzqNuUfNG1NGo6s++BHT89ni2z7VTt+m wKsxYp3IKcOpJNP/mt1FVNl0hCThXHeM2Tja7B6wxzZJMRWwuwrdVHhejyTGW/lQJAhK M9KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=JJ2tzNai; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=UXoiUpzJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y23-20020a37f617000000b007067199e960si7917454qkj.643.2023.01.19.23.47.49 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jan 2023 23:47:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=JJ2tzNai; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=UXoiUpzJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1pIm1u-00036o-RG; Fri, 20 Jan 2023 02:41:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <prvs=37747d9ec=alistair.francis@opensource.wdc.com>) id 1pIm1h-0001zZ-42 for qemu-devel@nongnu.org; Fri, 20 Jan 2023 02:41:29 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <prvs=37747d9ec=alistair.francis@opensource.wdc.com>) id 1pIm1f-0004qg-65 for qemu-devel@nongnu.org; Fri, 20 Jan 2023 02:41:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1674200487; x=1705736487; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cDRw4IBpTpo6zSRlPlUYTu4a56emOYbfmxDFaCQi4Bc=; b=JJ2tzNai6Ke/nRud3qSspDcIZbwY5eToGst3bgcfyFOVWspwa0WdnABs 142A/yUpQr1DGLSeL9iYzcBEKVrpusaBx54IfstNDx34uSHrD6rI8/VMY fEDQwVR7Ew2u05cJxGvTazBaqbjHm1TPl34Ti5AI0CAohabhyOe411Hu7 3KPnRutxZ7jRjDREmLYn54q/1uIk+5sj1SU0JFKZVBC5SoHWjR8w0u8cK yni43YGA3F9OHJ9kR4nZBZQgVpBE/759NSRp/kDpo5hu21XOELL4QQDd/ 75khiOLBFm84CXc8rPx4Vw5Q7j9SSrqensLFtHSdrulFCbKc0n6B/GOAz g==; X-IronPort-AV: E=Sophos;i="5.97,231,1669046400"; d="scan'208";a="221176766" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 Jan 2023 15:40:31 +0800 IronPort-SDR: 19xCBPmQaoG7hsa08tjpoRStfhjrWSx3A7GQAJj3pFGg/nuD4GWyZ/jHZzD7b7KMjj3Yc5Mxw6 vWvF+yYJsoM+8MUNjd6zpviVm1GtaSvM4AG4KUIOwg34I1WMnP27xcMUblaTHUTOoicDUNqvZo y1Yk+KiKL5lW7luRY1MdpD2lMeKl8JhpiXbpLL5oShLR9EfLWzFQYEZO+zu3s85IUkgarPqZJf nHEKrjUrkmOZzhFQu+gNfnDtkvjkq9NjDIvRhzl8Flw7MUpVYmNP38G6gejAQ3iHQudXFF8ZzY UQw= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 19 Jan 2023 22:58:09 -0800 IronPort-SDR: yWKQFK3FuTE/7eqISQ9116oqx8P+1oUCw0DgMwP3pS4HjQISo8WYR1MxCEQCJjn+5jsMJ8FWfQ IUKYKasxCTdJ8fTrc320PlLQ0HhkWTYnWitUEnQ4HlGuNNjs7Q0XO+S4NdqJA/jTTiw+FOprZZ /nEq4szuMwtJB+IiRozAe2uehLE5aCXoImabcDLI+WiKQAWrnPo+Zpwp+1LdBI+dEU/CuQYMup 6dHmbAhJgIHvyWBv0o2OqqaKcYLAUTwpSNaYQ5pmmftCXlXjCq8S0dNfO2miqhd4t3aEWgv9VY VSw= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 19 Jan 2023 23:40:31 -0800 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Nyry71SQkz1RvLy for <qemu-devel@nongnu.org>; Thu, 19 Jan 2023 23:40:31 -0800 (PST) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:subject:to :from; s=dkim; t=1674200430; x=1676792431; bh=cDRw4IBpTpo6zSRlPl UYTu4a56emOYbfmxDFaCQi4Bc=; b=UXoiUpzJW5wFplIwVgec0bbuEEONVSFnYE K2sPyKc8m2qAbFv4lt7zinP37swnuWVxb9lLy5GKosic8JMGnYkZHsfjRYUhlrAj KC1jJFXUVWT05YAQw7GY/Cno86i2UNeRacdfv2APsfKhTtqLB8M5PPTw0kaFTQmC hWbAu3msPANJ6SjdLTmOLDQGEb+2wLSml2Ep+JbnaqUcUPYcIl09KnBJAGzZL+VM TXDXebMbuW9QHY5TfkftUvGe5GcM4uaZ/ZgON7226vqg5X1FfrEpRhBhBGM3L6ZB YS+TlRjiLdir8hC7ndpjPHhKoVHkU12w+jv9JJcWHZWAbJfsrQ1Q== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yyZYE4UyPuGW for <qemu-devel@nongnu.org>; Thu, 19 Jan 2023 23:40:30 -0800 (PST) Received: from toolbox.wdc.com (unknown [10.225.167.38]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Nyry55ZYzz1Rwrq; Thu, 19 Jan 2023 23:40:29 -0800 (PST) From: Alistair Francis <alistair.francis@opensource.wdc.com> To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Richard Henderson <richard.henderson@linaro.org>, Alistair Francis <alistair.francis@wdc.com> Subject: [PULL 34/37] tcg/riscv: Use tcg_pcrel_diff in tcg_out_ldst Date: Fri, 20 Jan 2023 17:39:10 +1000 Message-Id: <20230120073913.1028407-35-alistair.francis@opensource.wdc.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120073913.1028407-1-alistair.francis@opensource.wdc.com> References: <20230120073913.1028407-1-alistair.francis@opensource.wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=216.71.153.144; envelope-from=prvs=37747d9ec=alistair.francis@opensource.wdc.com; helo=esa5.hgst.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
None
|
expand
|
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index fc0edd811f..01cb67ef7b 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -599,7 +599,7 @@ static void tcg_out_ldst(TCGContext *s, RISCVInsn opc, TCGReg data, intptr_t imm12 = sextreg(offset, 0, 12); if (offset != imm12) { - intptr_t diff = offset - (uintptr_t)s->code_ptr; + intptr_t diff = tcg_pcrel_diff(s, (void *)offset); if (addr == TCG_REG_ZERO && diff == (int32_t)diff) { imm12 = sextreg(diff, 0, 12);