From patchwork Sun Sep 15 13:49:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 173807 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2456366ilq; Sun, 15 Sep 2019 06:50:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxTuw20e1YNCrZwlWgcrriguE/FI8/q4gGSsL8PxNxcayPYL8eWuws9blggo76ZBDOGg/Z X-Received: by 2002:a37:4c54:: with SMTP id z81mr23985047qka.18.1568555411414; Sun, 15 Sep 2019 06:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568555411; cv=none; d=google.com; s=arc-20160816; b=vJlVePqWWCXCLAFGIXjZ8IKoz8sKOmqLOAERzgw7jAfAU82dZt6fBIvnnsMhGr1s/i 4S35p6K3O2TSHaVqH32WYwZ6RsJCch5Mfnj1SpwLfl3R2xz2fM9JroKCEY4ExaBCOAmr pafcSBBORHNz6AqnWTd2AdxR3D8B+UoOjZbAPwbMg0xJ3Jlsa1JXzgpSgMXWWUI+ik6f f6tG/rxgSIw1+ksB8y5xg4sGgYa4ttUqoua2yKWC6oxMxq72ETnC4rCE/LXNe1DPi92n 3viOwnpXjDUcT8mxzNMSCQ6C2eB4tPTKy07j0KYtpU6kEqaEnkO3/tt9kfW/GhLp3xdh Ki5Q== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=4kYZic5O2mp1QlkKf7vv5d85MpELl5rJ1Zh6m+8PAlM=; b=e8YpWxPL6QzLAC3+gXKseJIsA0OK57D0WFqMrX4x5vhTNSiC0TjTswN3icmWwuMXCx cjZybjBp6lb4ltsRY3i0ZoX3ndVjMLj+yUg6UT/9mV6niYFo5u0vH/RJ8ZDqODk+ctqF cs1skcyY+9bV1lXGXNyz2S6h1R7Ep1o4lg7mYj2/HVGNbyITTlmweLlJf4dpn0b1rxBU KTmqtoExxdYsllrp7JI2ufuYOptoRswLo/5yrmEvQgb64vYosTsHxWOzfVo4PsX29PHs JF0lMY2J+bYb84vW5Y6OHQ2cKRIDtbSazuK5V2nDfkXhhqSf+MkRRZjtszAm8b00veRE XfVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hZEt4Ves; 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=fail (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 o28si26870773qtt.306.2019.09.15.06.50.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Sep 2019 06:50:11 -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; dkim=fail header.i=@linaro.org header.s=google header.b=hZEt4Ves; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Uuo-0003d3-SJ for patch@linaro.org; Sun, 15 Sep 2019 09:50:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59363) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9UuY-0003cb-Sn for qemu-devel@nongnu.org; Sun, 15 Sep 2019 09:49:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9UuX-0003hg-T1 for qemu-devel@nongnu.org; Sun, 15 Sep 2019 09:49:54 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:38587) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9UuX-0003hS-NE for qemu-devel@nongnu.org; Sun, 15 Sep 2019 09:49:53 -0400 Received: by mail-ed1-x52d.google.com with SMTP id a23so28568211edv.5 for ; Sun, 15 Sep 2019 06:49:53 -0700 (PDT) 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; bh=4kYZic5O2mp1QlkKf7vv5d85MpELl5rJ1Zh6m+8PAlM=; b=hZEt4VesGTwc0ewZCuyOoalac1MyMI8xxKSa7E2TpW0XvT468WEMzS+BgTTvsizsSv rOX0lhHid1cIkIzCEPK6Hs+u1lfdrwh2KtFH+/TgSNXLacY7nuSeVQIWyZbJkvzYqq+o x1/OrcbTWrfVjsKL/NKO6NGNYwpgYYIxcYda7KETEdgY3kJ062qj4jU5bEWD+1sTBNeh Xzuo0aWvwPmZd9rZTv+W4TFVVpZ6X43Xl5AIkfJd3C3ENfcSglfHcEdFHfhNJ2SLJ4Lc rGKtgaXA7bzI4w2MLYX3XDFODryq/8Gjq0hXJ5PUu7R+Y69JMtHnNoF6UM9+zEy6TF8j F5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4kYZic5O2mp1QlkKf7vv5d85MpELl5rJ1Zh6m+8PAlM=; b=JAk6zgADImnVxQZkjBzDXCkm0KzALxa2iTzLvr9UWPf+7pgicfdSL/KzlQb2ZVKIor YfscwnVtM8/AswJGlHiRPlk5SjshJvVBh61EuPcVd+vTh3qJQemu6m0IuyqmKP29Ns0L HJ7YihlmYmv4a1ckipbJqAtLACkwOavel9FNy1K3Td05HT5yCiOSB0RkzOe8EVD0MzPj UQPkjr/+BEim0m/Xd7V67Pl3e6q7WZaQhdEIxQAOv+XV4XlQ2mOug3iXD7OU1H2lFCNh Dn9R61JKd2zsvQC/xNzRqLTNcG6rYw+t+z88bV8K2s8DHQ83GFtBdvHvbWr5le8MVS7g 4ETg== X-Gm-Message-State: APjAAAViHtoN9ifTKFXimcmLZKNaLDylAP7udYUDdt1eBpdHUtircTan JrdDwdy1p+wHhMe4bjTjcXuWuX/8wIr6Mw== X-Received: by 2002:a50:979b:: with SMTP id e27mr3695083edb.173.1568555392562; Sun, 15 Sep 2019 06:49:52 -0700 (PDT) Received: from localhost.localdomain ([185.81.138.17]) by smtp.gmail.com with ESMTPSA id ot24sm123053ejb.59.2019.09.15.06.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 06:49:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 15 Sep 2019 09:49:43 -0400 Message-Id: <20190915134944.2173-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190915134944.2173-1-richard.henderson@linaro.org> References: <20190915134944.2173-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52d Subject: [Qemu-devel] [PULL 1/2] target/hppa: prevent trashing of temporary in trans_mtctl() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Sven Schnelle nullify_over() calls brcond which destroys all temporaries. Signed-off-by: Sven Schnelle Message-Id: <20190913101714.29019-2-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 53e17d8963..b12525d535 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2214,10 +2214,11 @@ static bool trans_mtsp(DisasContext *ctx, arg_mtsp *a) static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) { unsigned ctl = a->t; - TCGv_reg reg = load_gpr(ctx, a->r); + TCGv_reg reg; TCGv_reg tmp; if (ctl == CR_SAR) { + reg = load_gpr(ctx, a->r); tmp = tcg_temp_new(); tcg_gen_andi_reg(tmp, reg, TARGET_REGISTER_BITS - 1); save_or_nullify(ctx, cpu_sar, tmp); @@ -2232,6 +2233,8 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) #ifndef CONFIG_USER_ONLY nullify_over(ctx); + reg = load_gpr(ctx, a->r); + switch (ctl) { case CR_IT: gen_helper_write_interval_timer(cpu_env, reg);