From patchwork Fri May 12 17:17:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 681205 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp4071478wrs; Fri, 12 May 2023 10:18:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5o/5Et2jMGUNrxwgyqozB/HZcjTAmoz8pF8VSS2Sc85fie6jiYeIS/C+8anrrlFsfme9ZF X-Received: by 2002:a05:622a:20f:b0:3f4:ecb4:85d with SMTP id b15-20020a05622a020f00b003f4ecb4085dmr10817479qtx.11.1683911914591; Fri, 12 May 2023 10:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683911914; cv=none; d=google.com; s=arc-20160816; b=Kyx0HZtdaennS4N1wMOHMakfO7HuwssdZI0tTOSBWvG7CGQJxfzMEbu0T1sOnkj5Ub fg7BLvBVy8iPNruOEdFX11TTB7sZKwO3XpLMlRVcq7IwEXlXN2++qitC0rH+7nYg+x7B +MutGGYrmBNLkFzDvw7UYp8fcJ8a0AFZDomQBfPNbxA9s13Ty/DTEhd2pNHRwvNJMiUA 5vm/C6NTM3viCBO4eVHyV3O6Sm3B40AcwDqWsZDlk/glj2dzaZob0WriFoHjwVa/T0rF Pb+ojEEw21+hwwZVe4+V8ossY4PwVuxA7xmKSgmz5+PBC6n1QJIDKm8wnnFfy9ssCGSy nvFQ== 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:message-id:date:subject:to:from:dkim-signature; bh=miBGGjW/ZQfOCs7U5dTa3vNRbLi2IQsdXFfT88TdwaM=; b=B5hxUV3zGRx8O0B9Pmze3+P0XwoNSmTga+6NKgktYqeCP/NBaIcl1qyPxET+XDUJx8 hqQRdJ5+huKdVw+gqu+2G7fJLrGWCi2jxswCvgD7bAXUMJSkrpRsFFhHVvFLh8/UXy6q l7sMGun06DHR1uv2nhctmbt+pHM/hn780cLc8mpb5gBG8eGvKes6LYHOJ91QLxttMi41 cQSXapvNh9vKhnOLlCciQ7vkaKx/PlJvpjGTYw9iUCwBej6Yqa3peR5pMf9ZRj2F6cZj pmSevDV6672mJqxZNYCHwoyq6ofJJE66fZY6ULpH/yr3NQQkTkUPHYv/G4SqJ/VVtjoo CNuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ePDCiVkr; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h13-20020a37de0d000000b0074e211374f8si8588147qkj.711.2023.05.12.10.18.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 May 2023 10:18:34 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=ePDCiVkr; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxWP9-0007Lt-2h; Fri, 12 May 2023 13:18:07 -0400 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 ) id 1pxWP3-0007Jr-59 for qemu-devel@nongnu.org; Fri, 12 May 2023 13:18:04 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxWP1-0005HB-Eg for qemu-devel@nongnu.org; Fri, 12 May 2023 13:18:00 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3063b5f32aaso6709063f8f.2 for ; Fri, 12 May 2023 10:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683911876; x=1686503876; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=miBGGjW/ZQfOCs7U5dTa3vNRbLi2IQsdXFfT88TdwaM=; b=ePDCiVkrEf0LQHw1xkBKNodcLt464K5eZ0IuIF5Is9ByYN8hVEGyjAjek1Qv+3Or7N S8RwDOgUY3jsDblmrS4RaW28EjKa3QSTNrS6qUToWcM0v2XP4jHPEv/j1kCgnuI06GTq 0lZJYYnTMZ8si+RhHEZeKeh4YBOPfn8bl0mp3p/YBlZHWQ/qGrCZPmCTSUcNWS/POpM6 HeMA9WaeHrlOxb4KcDFRtnJUwrYdXkKb37pFS6iUkHTjk9yFGEqFgNjcFYonujtmwJUE p4OYYBLHWp2ClV7Wiel359atrqr+kISw5i+KcHj1UlnNDgVimrw4njQ5MaT610LWJ7AF p7Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683911876; x=1686503876; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=miBGGjW/ZQfOCs7U5dTa3vNRbLi2IQsdXFfT88TdwaM=; b=kCxGEtnYdDGPJHuUZrVx8wUMepW0i3OlF/u+rEg+cLkB7Dp+rD5hKHJzC5BCGNqruH FD/sdEcoFGFuvPSnm60oSYRXFHRkY8+dIFomKdTgKlI3Kno2bdxB+eL2egkH204Z98I7 VbmCBkRTUNvq9NpB2a/oRm5p1ow3opWcIEpMyJ04kFkD4weVCHuXF7BlJDQsUQrgxljJ w2+ooO9KDNL7M47nJcodHC28gdZYdcI+23z54XOBVBQ+TecN4iILxiX/+1jDh2oTRFvT CcprGWef0wIkJqUeSbKYrcPR99iqXtJLGBeNBYa8HEhGsK9a64WySBX+ehCg6jLmwmpH jeVQ== X-Gm-Message-State: AC+VfDysSIPY0KoIP9+ARHUxuQtYZHfFz4B8SBz26QIB/yp5cT1DmXST yJk1COL59v16AiISk6Q6lYQTyYmCPn2HMVytgSjSSg== X-Received: by 2002:a5d:5248:0:b0:307:aa7c:58 with SMTP id k8-20020a5d5248000000b00307aa7c0058mr8638998wrc.40.1683911876536; Fri, 12 May 2023 10:17:56 -0700 (PDT) Received: from stoup.. ([83.98.42.3]) by smtp.gmail.com with ESMTPSA id j18-20020a5d4492000000b003021288a56dsm24010620wrq.115.2023.05.12.10.17.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 10:17:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH] tcg/i386: Set P_REXW in tcg_out_addi_ptr Date: Fri, 12 May 2023 18:17:55 +0100 Message-Id: <20230512171755.1237329-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The REXW bit must be set to produce a 64-bit pointer result; the bit is disabled in 32-bit mode, so we can do this unconditionally. Fixes: 7d9e1ee424b0 ("tcg/i386: Adjust assert in tcg_out_addi_ptr") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1592 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1642 Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index a01bfad773..9fc5592f5d 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1091,7 +1091,7 @@ static void tcg_out_addi_ptr(TCGContext *s, TCGReg rd, TCGReg rs, { /* This function is only used for passing structs by reference. */ tcg_debug_assert(imm == (int32_t)imm); - tcg_out_modrm_offset(s, OPC_LEA, rd, rs, imm); + tcg_out_modrm_offset(s, OPC_LEA | P_REXW, rd, rs, imm); } static inline void tcg_out_pushi(TCGContext *s, tcg_target_long val)