From nobody Fri May 17 01:44:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1680894162; cv=none; d=zohomail.com; s=zohoarc; b=QHMoVDCd41CU/DJTse5FrqYzUJqeka4vQAc5S2HM5EArUJrWsZJH7bz3LHVMLjTr7A9906inGFqr1cCZemckycRtnMSnaS/TuEbIxV8Me9frFjxEOzV/SrWWpoylc9+gWMJQVVKYu6Y2vgYazKk9iWd1nOjhVqQBpb6kB1euj2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680894162; h=Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=rcNEhGFLchqZMB3huLw45XXaPWISEFJfrSvpuPV2BPc=; b=FmRlqNi3HRFtHRfIHTSXPyS/qy9jfFpWBUTMxExdMRZ60P2kJdz3b+0KP2P8OG4MPSR7rxXQeg0+MPx9eL6T3kiAge++7Qc8jomhQt0FlyokuFrew34FQZzfaisGaSPUGh3TGNTRb7EqjoloQQjos62b6sOeOMk3TuVJri0wK18= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1680894162349413.10752979942777; Fri, 7 Apr 2023 12:02:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkrLb-0000AK-HP; Fri, 07 Apr 2023 15:02: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 1pkrLZ-0000A7-Te for qemu-devel@nongnu.org; Fri, 07 Apr 2023 15:02:05 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkrLY-00046F-5m for qemu-devel@nongnu.org; Fri, 07 Apr 2023 15:02:05 -0400 Received: by mail-pj1-x102e.google.com with SMTP id l7so40433064pjg.5 for ; Fri, 07 Apr 2023 12:02:03 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:8bb4:5a9d:7ab7:b4b8]) by smtp.gmail.com with ESMTPSA id q11-20020a63cc4b000000b0050bc4ca9024sm2951221pgi.65.2023.04.07.12.02.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 12:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680894122; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=rcNEhGFLchqZMB3huLw45XXaPWISEFJfrSvpuPV2BPc=; b=rMblbD2odMTUnuW8jivPu+nH+4U7J73whYaNk7FMLX5QFvV+O3v6PX3WahZa8y17jd xXM4FYdCL+QINKXvFce9yFsjFKnYhbkfh67wIR1SZn5O9zhOGhGniqMiDmXSVriDgvrD ISnvsfFFu9hw/AqxOWX5mXr0AnIF7mo9wv4pp9XxFhqVY9Ytbc2bUaeDXGsIK+SZpfd+ F5YJFnPZgRgHOYUZcl6VbF6lvxmoItl8zmeXayUlcwidIxqcJ63CFjopjUc7XKF6nYH6 6ZCs34CudW5z51ELAvtzL/ZyhgS4zzEIW945p4UK8KkqG0rC2zsJSfmHtwyjfgRYnOy0 34Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680894122; 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=rcNEhGFLchqZMB3huLw45XXaPWISEFJfrSvpuPV2BPc=; b=uwZqTe9N3dwgznAdYQYqkhozY896ZFnNvF1Ob0VXoJsmaBWu40qsukxmLXOxrz16V7 FTckUSFZ2zx0vlKH96w/uxi2FeDohTm/Nhzx3donMJX0479vI74XLadHuTWbQrvIHUwQ wfO538TLA+8oaaUa9gSoh9/gMsNaf2Mm9iWg/Uzk4BqjMoav36dtFgv2DkVXncK4Pyre mkOwZHhwdv4OTyDLcA1elD9/E2qzk3HqpN03L6orioub80+WoPz99sWp0zH7vCko8S53 go5JIrqjGCvp8MfkpuIDXUzgZMCDp8UCc5J1inikxv8nDSubTBHdsJJCcdJnRjj5DwDt SJig== X-Gm-Message-State: AAQBX9eXu9dmkX9wQ4X6l/NTBXbP7KONUhChZXyz55La1fWoA7+3LCjF obJigABVOks/eOi+jfx7E47EtEPoTCfBvTZLdGg= X-Google-Smtp-Source: AKy350YI3IYRqur3PHBsOBxf4FgCInbRjsA6kiFsXGJouRJfPtIYetDfBAACsrLyrV/d+8EpW805Sw== X-Received: by 2002:a05:6a20:cb47:b0:cb:af96:ace7 with SMTP id hd7-20020a056a20cb4700b000cbaf96ace7mr2712196pzb.46.1680894122151; Fri, 07 Apr 2023 12:02:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-8.0] tcg/i386: Adjust assert in tcg_out_addi_ptr Date: Fri, 7 Apr 2023 12:02:00 -0700 Message-Id: <20230407190200.3259312-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1680894163592100001 Content-Type: text/plain; charset="utf-8" We can arrive here on _WIN64 because Int128 is passed by reference. Change the assert to check that the immediate is in range, instead of attempting to check the host ABI. Fixes: 6a6d772e30d ("tcg: Introduce tcg_out_addi_ptr") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1581 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 4444eb9234..5a151fe64a 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1082,7 +1082,7 @@ static void tcg_out_addi_ptr(TCGContext *s, TCGReg rd= , TCGReg rs, tcg_target_long imm) { /* This function is only used for passing structs by reference. */ - tcg_debug_assert(TCG_TARGET_REG_BITS =3D=3D 32); + tcg_debug_assert(imm =3D=3D (int32_t)imm); tcg_out_modrm_offset(s, OPC_LEA, rd, rs, imm); } =20 --=20 2.34.1