From patchwork Wed May 17 08:00:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 682910 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp231363wrt; Wed, 17 May 2023 01:11:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6aMNsK5l52eoo8309wwMd9tFfPfixVzKWbuVCQ/XIl/ze4nWTNMZV11g8PwIy2sbUDzWyc X-Received: by 2002:a05:622a:24b:b0:3f4:f210:959b with SMTP id c11-20020a05622a024b00b003f4f210959bmr31759014qtx.12.1684311116130; Wed, 17 May 2023 01:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684311116; cv=none; d=google.com; s=arc-20160816; b=AaaCsAWSMyXrGLw19w5dK9mR+F9azbQSDVB1uyVrnDBGKrVnaR2AVH0rBOPg1hmmwT RwezTsjQNFBoTLbeyoTZ11U9WwWXXMhKhk4FAgc+iG30kSUSzEE7xj8li/Dcv2Jp3XAD osqqpQG4qgY4P8Loe31fz+T2KAiFUvKiwC8Te3TdE/DrH7eCEXLuNNGJlb1CBP3P9/3n K3i9TKYQ6NhMVtLTbWt7qisTEwqN7jadBMkhranjEfnTvWN7LCtMLI6Cj74AaheSkWb1 1nd/PAhoMnhLsHN+B12oapEikFnAP/srn19Esqh2MORXhZF44bTOXNrUr6IkWNr/QZAE E2tQ== 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; bh=6rU50hwLLA3/v+Dtuo0MSIOKwUKr42PlhvOY/mjsj/M=; b=Agnkq/GcmTdkL50mywaRS7BZnc50UDfvFoiSoS1CHQ830GxAXN1Y80JDTaBjLRoMvX FzgbmqYUl1gOfb8Tj0FEZtT9BuL4fqNdMCvAL9RviFwLy8XPS7E8TqiQBc6w9m5PFdkY WriL0htcUUKuH0ts1ILgSCrhrd1iZOpSkFQC6KzwhyEr8jB9c6cBZdv3H+ySSmwzazzI 0+sqi5Ur20JXp7+Ho1ulxSRSS9YWjZwYQ9QR4dvmT71w2Bbuqp0dL9LflZI8oRePc98Z Q+tcpDCh4ndA71U26s2ASEB2rv3FiWh5V61dAbkUdgJZaqdibs6/pcadZyBmHGbAzxyA cfOg== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t2-20020a05622a148200b003f38c9bd035si12508816qtx.782.2023.05.17.01.11.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 May 2023 01:11:56 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzC73-0003ZK-4t; Wed, 17 May 2023 04:02:21 -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 1pzC6t-0002wS-Gy; Wed, 17 May 2023 04:02:11 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzC6j-0000mV-QN; Wed, 17 May 2023 04:02:11 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B8C79676D; Wed, 17 May 2023 11:01:01 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 48C3A5E25; Wed, 17 May 2023 11:01:01 +0300 (MSK) Received: (nullmailer pid 3624187 invoked by uid 1000); Wed, 17 May 2023 08:00:56 -0000 From: Michael Tokarev To: qemu-stable@nongnu.org Cc: qemu-devel@nongnu.org, Richard Henderson Subject: [PATCH v8.0.1 36/36] tcg/i386: Set P_REXW in tcg_out_addi_ptr Date: Wed, 17 May 2023 11:00:56 +0300 Message-Id: <20230517080056.3623993-36-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <<20230517073442.3622973-0-mjt@msgid.tls.msk.ru> References: <20230517073442.3622973-0-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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 From: Richard Henderson 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 (cherry picked from commit 988998503bc6d8c03fbea001a0513e8372fddf28) Signed-off-by: Michael Tokarev --- 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 5a151fe64a..5c7c180799 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1083,7 +1083,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)