From patchwork Wed Mar 2 20:52:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 547528 Delivered-To: patch@linaro.org Received: by 2002:ac0:f585:0:0:0:0:0 with SMTP id s5csp36564imq; Wed, 2 Mar 2022 13:08:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSQcDBeDhi5QptBKx3qfhSELZghFqPnCyknj6x4tj9rdVQzTJqr9e+kMzw5YltFzVD2F4q X-Received: by 2002:a25:424e:0:b0:628:7c46:3e3e with SMTP id p75-20020a25424e000000b006287c463e3emr9735195yba.166.1646255281704; Wed, 02 Mar 2022 13:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646255281; cv=none; d=google.com; s=arc-20160816; b=WhZfuxSuPIZpQV6ibYBM05Md+3BCA2gGQGvU1EEhchWomwpj9Nr9LXaQ6rG8IR/ZIb 0mM+qEgAgo88IiIMxJtwQsCV4gmKzq5Qs5bdES1P3U4GWGer9JeJhml+90kNUsYaqEnx HUYgQRsqXHGmOGy9YMNJWzHKNFGqgrfwhEcxIMmQW3zoFXMENQFDdpvio29zHdbgoLL+ vWt2X7JNE6ybH8j8HWFlRg7kcEut7vDOaQmr3NchSutnB4a6NH1qb7QSYJBXmG5H4i4a y/fVLdnQSyslP9dABZvGkTxhAw8dHGsVnJHBsP27D0IAwIOBzLE+qdm5DNZ/v+dHiTtg SlPQ== 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:to:from :dkim-signature; bh=uceZrm8t+0Mt9tyMwvyRcCiMhGjKSU6WwAbSSYwHPe8=; b=eBH03bS24O9It0dc5Mkl2IRHFxHQILcnaVBc37wfomU4kg6vnOJdr834qhXPUTAuMx oUHLvmBJjlRLfzmKqKr5ZypuK7yx+aOAWftUWPH85IfHaSUDKe1+p68sDx61YOLr5FDA 0plPGc17AiR25tfssS3XGeLVCMAMcPUZlyQkM2Oz++VWtqJSG+jEzWbyU0ITifrT6IbH 1NKQouqgeDjpF4YI62+srsa0lkgwQRBxSMqbK3USVgQ26tLcbvekq9iXv3pRV6+nQrXP n6nPN4ZF/ApwJ9WpPfU9OXgo1si6YBwPgHgIPPHX2HTdiT+IY6alaQSgltBx04pcMwGv nnIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I0hN8BxK; 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 k186-20020a8193c3000000b002d6e7a72bd5si30812ywg.184.2022.03.02.13.08.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Mar 2022 13:08:01 -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=I0hN8BxK; 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]:37812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPWCX-0002fA-5p for patch@linaro.org; Wed, 02 Mar 2022 16:08:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPVxh-0005e5-Cb for qemu-devel@nongnu.org; Wed, 02 Mar 2022 15:52:41 -0500 Received: from [2a00:1450:4864:20::429] (port=33662 helo=mail-wr1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPVxf-00086L-F7 for qemu-devel@nongnu.org; Wed, 02 Mar 2022 15:52:41 -0500 Received: by mail-wr1-x429.google.com with SMTP id j17so4743877wrc.0 for ; Wed, 02 Mar 2022 12:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uceZrm8t+0Mt9tyMwvyRcCiMhGjKSU6WwAbSSYwHPe8=; b=I0hN8BxKNuU+DNvcCTEkkqBPRvIeneOgTeEDXjvHAlPaUwBD+1vYRnV4apNFhmej8A 7JgDysY7nFsrGLpvk64M3NKk7oNSAJZIGZ4D1Ef7xTx1YiX6GzrwO2Ya6picMfZy7w+e maAJlUAsScYETEsQJRyRqB2LRA1/Wq7ouny1lxBIrsCi3SxepSoESifRbx4ioJmiXDW0 RM5ndXVkZp/tJEXIGNiIK2dYtKbDf2/0yBWbbwVT47b+L7FHYBmVrOmzMWchT1oQ1FOU Dijj4ij1EBSmFIG7DoEnqDSiMJiGJmWLuiu0q84RXno6h+ZwttU9c7tyEXqFeO8VOhYu /ZHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uceZrm8t+0Mt9tyMwvyRcCiMhGjKSU6WwAbSSYwHPe8=; b=SHRfKqRNRXmJsi4bPZ8Jx5RNnLN9/EWnXgAfCvNo57BeX0gmCPkWNecm9NVGdVYW6o VR0PkKjUW2Xy0ZKbFbO+DWvtxpQFs0TqkufGstqW6XMX6zYVUUbSQub5zHzQoDdhNdNP sWcfM0YTWH1LkhxttuOt8LK5rPGbTxKUZ07wYROQSu2Xn+6wyPJS8y+cxHamv4Rg3OQN XGtBgVp6WMSF+nYO/BcGm1GevLRIcK6i0xOc8G3+K18y0k9es2n4kqZKyQ1XqncKi1IX iCyDp0of0iC+MgbG1vVD1PV8zL0ieFwEzY63jrNWFWP9sgg8IJwyytV7jl/HcQa1cHUz qa8g== X-Gm-Message-State: AOAM533eWq3t9jt6DldXycdDYt2brR7IQFACl7yxFGslshVioMUyimzX FipykxWyq9uSVxmJz+bz/cWAzp6tu5f6iQ== X-Received: by 2002:a5d:628d:0:b0:1ed:f981:ccc with SMTP id k13-20020a5d628d000000b001edf9810cccmr23450314wru.616.1646254358145; Wed, 02 Mar 2022 12:52:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id x13-20020adfec0d000000b001e31279cc38sm90801wrn.11.2022.03.02.12.52.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 12:52:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/26] target/arm: Fix early free of TCG temp in handle_simd_shift_fpint_conv() Date: Wed, 2 Mar 2022 20:52:10 +0000 Message-Id: <20220302205230.2122390-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220302205230.2122390-1-peter.maydell@linaro.org> References: <20220302205230.2122390-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::429 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Wentao_Liang handle_simd_shift_fpint_conv() was accidentally freeing the TCG temporary tcg_fpstatus too early, before the last use of it. Move the free down to where it belongs. Signed-off-by: Wentao_Liang Reviewed-by: Richard Henderson [PMM: cleaned up commit message] Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 5a1df25f91e..d1a59fad9c2 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -9045,9 +9045,9 @@ static void handle_simd_shift_fpint_conv(DisasContext *s, bool is_scalar, } } - tcg_temp_free_ptr(tcg_fpstatus); tcg_temp_free_i32(tcg_shift); gen_helper_set_rmode(tcg_rmode, tcg_rmode, tcg_fpstatus); + tcg_temp_free_ptr(tcg_fpstatus); tcg_temp_free_i32(tcg_rmode); }