From patchwork Mon Feb 28 18:09:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 546701 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp2971804imf; Mon, 28 Feb 2022 10:13:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKU9SNY4Wtxk99qXhWB1NdvI/KigN/Ad+Hh+8IcmBm2ujl8C06yBQ2GLCuFzBpKbKAADyO X-Received: by 2002:a81:410c:0:b0:2d0:c3ba:c799 with SMTP id o12-20020a81410c000000b002d0c3bac799mr21246802ywa.193.1646072016456; Mon, 28 Feb 2022 10:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646072016; cv=none; d=google.com; s=arc-20160816; b=Uvr38QcrhVi5oYCZYanFT+Z85qZWy2yP/gJtqRI4KnxbtiA/3qog1tgiBjmWVjmMJT xPgPonR0OBVYXlGyYWCw7rKb2NEXDyTgPIaKQKrYxxrg4pIAJcseDMg7b4mT5TeIHvEC ji+8Cwyjk7zW6CijsZckxU7jQ+25BBuQ51I0HBngbYKAMMjlKpkLC2QtvTS2QP1E/Wjm nTwVa2cnqzuIjEPWnpONNDi4GxUkZ/iOKBlnGlVRx/gJftZBZEGXxoMnJMXMh8cDDP3C 5rvo08ExedRDQg1UFahvmHipfWqGBx9QIKHwg1MDwpUuxh55dIaCG4ew2VQJ6kF7eZl0 qLog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=iaKreptzWVFs7oP+uIr5THCG4Jhde8CcYeoZWHUObC4=; b=FYiLMvqa0c63oKsb915mXhTdhGqsTcyZ7iE4pEXN7nAhIUscPt2jWWNO9kTuD+ty9b vRltp5OddzI47yvU7P/4zp4uQX8KQ3Yw+t6tqxoBnJj4b0Vftcm7/UgrG+sov0QCq1wz LWvXd4b62cyXzJxnkNnQDwgMgIaGERaF4ZViha2ZVsot5clo7eA/mERrszozJk30p7qY Jfthlj1ABBsNgCGZCBod7Cc6cjEXzp9vACPZH9asfTYdFFfS4QLE7YKCGzR01G/6zjIS T/1CngHYN8bJcElfO/4ClK2otZowyfgEjrtsB0eunbP8qqOUljA6kqviKpjBUCWPai9O w+Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XY4nLN0N; 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 k190-20020a813dc7000000b002d0b238fef1si8335808ywa.383.2022.02.28.10.13.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Feb 2022 10:13:36 -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=pass header.i=@linaro.org header.s=google header.b=XY4nLN0N; 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]:49866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOkWd-0001Pe-Uo for patch@linaro.org; Mon, 28 Feb 2022 13:13:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOkSf-00051f-Hb for qemu-devel@nongnu.org; Mon, 28 Feb 2022 13:09:29 -0500 Received: from [2607:f8b0:4864:20::102a] (port=55835 helo=mail-pj1-x102a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOkSd-0005xb-3f for qemu-devel@nongnu.org; Mon, 28 Feb 2022 13:09:29 -0500 Received: by mail-pj1-x102a.google.com with SMTP id gb21so11844438pjb.5 for ; Mon, 28 Feb 2022 10:09:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iaKreptzWVFs7oP+uIr5THCG4Jhde8CcYeoZWHUObC4=; b=XY4nLN0NWK0J7bs0dTCcpH6Fd7WReCg8Y+uj8cdJ863pI37hQLA7RAi2w1vRdbpzmR fMHl8IeEFTctY34xpLzTsk2etEaK+OhTVF5eGJE7xK7aJJDAQ4OpJN/gbxb1TbBOQfIj tN3qP5O6nSyckgdaodhw49JPJC4oUGNZZiU3wZGWw6UIu5RUVfV4YEGaU/M604u1hUfz pBPxunje8RD69SrhVRNrk2IDuGESJDiFD/dAkkvHTyTZferpKhULxDJeHtnyPXAuexBr 6zoB1aVbzDqqWd7gfpPEQy0AriwA2zIqS5DF1vUitH7fP3Up5BchwL9HI5h6mYyUmro1 /S+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iaKreptzWVFs7oP+uIr5THCG4Jhde8CcYeoZWHUObC4=; b=vz7M9LBh4cukGSNkpG+rfwFfzEb376LpEkghK9yQ2vQSQiGR81lcOSg5vVC2vwRelB hv3Jn2+Op9RCsrHPjhMwUnidr+YCOWj2I4KudxuhNve1jdmx5stQcRGbx78TCsttWnRd uD/cU9RhIBW/YJE1fv352GXQtYgw+UjqsEVPwnLzY3Mp5xWDjQYQyp1PPQgkBtNP3jlG FTu8y01GgKLupWChblfnRlZDKeqKZON0h1KD0ezg6rrjRhuL/Y5xjoMFmj4+Uf+PEYBP Gpu/RKXJCLPPP34UJnorAfzLtIjoMv/tKxtNZc7y9zFURoRp8X9JYp+eFm93QZVuoX3w x1RA== X-Gm-Message-State: AOAM531oSIOW4egvYrPqSxlTskfCiCWYcjihWPH7lEIZEeOzf5Rl0cLR gOGuVjLbidPrdDs5Nw1OQuAdOHERa436uA== X-Received: by 2002:a17:902:ce05:b0:14f:8ba2:2339 with SMTP id k5-20020a170902ce0500b0014f8ba22339mr21973521plg.152.1646071765653; Mon, 28 Feb 2022 10:09:25 -0800 (PST) Received: from localhost.localdomain (2603-800c-1201-c600-483f-d486-138f-7868.res6.spectrum.com. [2603:800c:1201:c600:483f:d486:138f:7868]) by smtp.gmail.com with ESMTPSA id q24-20020aa79618000000b004e0e89985eesm13463223pfg.156.2022.02.28.10.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 10:09:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 3/3] tcg/tci: Use tcg_out_ldst in tcg_out_st Date: Mon, 28 Feb 2022 08:09:18 -1000 Message-Id: <20220228180918.38188-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220228180918.38188-1-richard.henderson@linaro.org> References: <20220228180918.38188-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The tcg_out_ldst helper will handle out-of-range offsets. We haven't actually encountered any, since we haven't run across the assert within tcg_out_op_rrs, but an out-of-range offset would not be impossible in future. Fixes: 65089889183 ("tcg/tci: Change encoding to uint32_t units") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 0cb16aaa81..9ff1fa0832 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -790,14 +790,13 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, static void tcg_out_st(TCGContext *s, TCGType type, TCGReg val, TCGReg base, intptr_t offset) { - stack_bounds_check(base, offset); switch (type) { case TCG_TYPE_I32: - tcg_out_op_rrs(s, INDEX_op_st_i32, val, base, offset); + tcg_out_ldst(s, INDEX_op_st_i32, val, base, offset); break; #if TCG_TARGET_REG_BITS == 64 case TCG_TYPE_I64: - tcg_out_op_rrs(s, INDEX_op_st_i64, val, base, offset); + tcg_out_ldst(s, INDEX_op_st_i64, val, base, offset); break; #endif default: