From nobody Tue Nov 26 19:37:24 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=1706005557; cv=none; d=zohomail.com; s=zohoarc; b=hqZg8a0fl+eONkrVRLUAOYa+DOe1cpDdBi+wsoiwwDOLNEGWEukFknTV5t05b+vj5YywKjUfU5scwa2Nfs2QEZ1BXYSPGGHLlTpuXgKYiFhxBQb3wChFkTnf9f/tnj8izSlgzXrO+ldd1W8TJ0bxnp9qLEvWfBSxzGCP3t0nn1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706005557; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oG4pU7qednB+jbhj9CwzPfU2NfzR3Eb/S1PuscRboM8=; b=aIUhE6T/8cCpwYdm1LRPlBg9GK4qfveUiZ+T/MacXuT0bwMR+v2hiSrAfZrhtsN5MEPzi+v1lZ2aPIECLZkoWwJsHKUJ4hoVeIAUv7SBX57EGgvC1Cil4SOhjqSfCtlL1aykF0JdtsFOKfcIbn2BxhwIzkpCC+n0ZFFmh3ikLYQ= 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 1706005557167893.1366058971796; Tue, 23 Jan 2024 02:25:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSDxT-0000RB-Tj; Tue, 23 Jan 2024 05:24:43 -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 ) id 1rSDxS-0000Qh-Hu for qemu-devel@nongnu.org; Tue, 23 Jan 2024 05:24:42 -0500 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSDxQ-0004e0-VV for qemu-devel@nongnu.org; Tue, 23 Jan 2024 05:24:42 -0500 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-599a95e3fceso114238eaf.1 for ; Tue, 23 Jan 2024 02:24:40 -0800 (PST) Received: from stoup.lan (2001-44b8-2176-c800-b8a0-0408-58be-7d2e.static.ipv6.internode.on.net. [2001:44b8:2176:c800:b8a0:408:58be:7d2e]) by smtp.gmail.com with ESMTPSA id d8-20020a62f808000000b006d9ce7d3258sm11072408pfh.204.2024.01.23.02.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706005480; x=1706610280; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oG4pU7qednB+jbhj9CwzPfU2NfzR3Eb/S1PuscRboM8=; b=sw6mEeSYC48IuXb4k4Iz2grHSEw+Qg0n+eNpF1ZaQ6FBVRuC4XiuPhWjHjILiYyvOd k8L8Fxauht/wJb088Y2YRyn55u/qd/ESFRzwb60Pxzo0fxrtxud8p/NySgdiJSIjoZQG bsp9A40LWdemoeagXg2zKqMvEugkOCDxRg9aKDNqoaZPEcHb8MJAH65Mx6CYT5p/+hlG sMZWu+ch0UU5wQXZsH/Ccwe5gVSytqUm18XN/x9Onx9XP9DyH5+n4OHDdiWiVGp85lc3 Bf94IcdKFxHBn3d2hbEH80ryd1rf/kJi6A5x6ks8/cJmm2Jlb/FRJMe/rifotlvO/ojR AGwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706005480; x=1706610280; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oG4pU7qednB+jbhj9CwzPfU2NfzR3Eb/S1PuscRboM8=; b=BzewXAK2j2PjnMyzH32/rzvnVIkKM/EkBGpkhPQqjMPCSRfxVH3KFK0Gee0gvbbYID x4bY3S3IlXWsz1Ul3LcXpl4jIc6MosqmRfb0c5bAUB3pVyKSUelSsSMGO7xtTv8OTG2L t7MxNaWdj40ahMn2bLBdUjSVBnXFF5OJRhHfdykx7AgXe/7wWfa4XJE88Sq6DXzXnota Shg7OpFrxazfLESm7705lQME9ODm4e/v/CF/fX3OihHjiDhNzHJniF+JfBCje3ZVA8vV eYBdSXCzkDbF3ZsBqfFdCwjKP12/ddM7aYt2yVc3gM/CS89i1Gl8+3wxg+jOyzOvXPXA IVzw== X-Gm-Message-State: AOJu0YwgPppI3EzDVJklOX7QV8DDXua3pL+U3D2nPIp99boTgUcsGBmT HiiKIln9ZVHvHkOJ+H+yJmhnawijK4QqYlvEOLaANnpqkRFFOYWgf5IYX/mnNStA9ii+M3AkrwI idUw= X-Google-Smtp-Source: AGHT+IGHfdovhrTxr/GMvwqWofqOPiV6XNwKXYCA9NecYBxJ/NhK0HeXCXEhZ5lPAYYeUsg99hhJGA== X-Received: by 2002:a05:6358:d044:b0:175:b71f:6178 with SMTP id jb4-20020a056358d04400b00175b71f6178mr4543150rwb.32.1706005479827; Tue, 23 Jan 2024 02:24:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Joseph Burt Subject: [PULL v2 8/8] tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct Date: Tue, 23 Jan 2024 20:24:12 +1000 Message-Id: <20240123102412.4569-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123102412.4569-1-richard.henderson@linaro.org> References: <20240123102412.4569-1-richard.henderson@linaro.org> 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::c2d; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc2d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706005557985100001 Content-Type: text/plain; charset="utf-8" From: Joseph Burt When tcg_out_qemu_st_{index,direct} were merged, the direct case for MO_64 was omitted, causing qemu_st_i64 to be encoded as 0xffffffff due to underflow when adding h.base and h.index. Fixes: 1df6d611bdc2 ("tcg/arm: Introduce HostAddress") Signed-off-by: Joseph Burt Message-Id: <20240121211439.100829-1-caseorum@gmail.com> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index fc78566494..a9aa8aa91c 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -1662,6 +1662,9 @@ static void tcg_out_qemu_st_direct(TCGContext *s, Mem= Op opc, TCGReg datalo, } else { tcg_out_strd_r(s, h.cond, datalo, h.base, h.index); } + } else if (h.index < 0) { + tcg_out_st32_12(s, h.cond, datalo, h.base, 0); + tcg_out_st32_12(s, h.cond, datahi, h.base, 4); } else if (h.index_scratch) { tcg_out_st32_rwb(s, h.cond, datalo, h.index, h.base); tcg_out_st32_12(s, h.cond, datahi, h.index, 4); --=20 2.34.1