From patchwork Sun Sep 15 13:49:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 173809 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2458627ilq; Sun, 15 Sep 2019 06:53:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxD80KcZJdcpuiGl7v1UTxBHmnVGCXSs8J91hBCuPfJGAw+h1EoE7bKtF0fyxC2gtvyN15p X-Received: by 2002:ac8:5306:: with SMTP id t6mr1637391qtn.53.1568555613278; Sun, 15 Sep 2019 06:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568555613; cv=none; d=google.com; s=arc-20160816; b=Jxr6v6GEX5VHRP32JjjCdP+LH/Qq4hCzdk1hVFpdUHJDNGVAv8yn0DKCa8lRHdve2x eQ7cUoRxTAuwQvp3BqIrZQIgEdmO8eqNlou+G59lfdVhhvK9KXrFKLDB/7aCwKouF6Zs 0ZjLpUr6yIvYeDmZoFN1F3hFfuS86xawhVStbrI0vBRN75kz3xdf4R2t/hW+F9CDsQ4F 8zWCpImVa91rMyhN1MA4MR4XrBEs7Rt8U3Axn/8Z5J46ip3taGMoF15zl9+J7aHKF8Vu wE+UOIvtWzPnV+qVq/STU+qEBEf64MTC7AMi0bS9d258pc9hLpugnxM06oepXnQXvdoh 3j3w== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=YAOhFzzxz8Wer64d+m0cXxodZOyQ32EAoZ5iMqeSp6A=; b=YYfJq7XGZiR6YiJUdYGl4hPoqotuMrXjnLyqLicO0Vt2JptUMy85KE/4JqTqRoeeir z1zLJmimuUvHsmYuYia6D1lCapeMD+BHV/NFe31S1gyT+8oRduc2Na6sj1QQJntbi3/W HDrjcCQiBMJjci+3DE3sk9q2CqZNrE3QbZUnzuBrb9+EL2heagJWsqAouvs4gJvtdrsa VlxV1ArzPh1AjkYhJwM3J20mfqUqxYmHUQ19zZWI5tEW+Z0iVPuZ7HzGCX+VeXjDpx+A +Syyi9oVnvtfA+AxkaCrn6rCLQC37NmsmzZubt/5QNT4YP050pBBImHxqwzdP5SLn+dY m2Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=A1ru8zBW; 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 o36si19871817qvc.157.2019.09.15.06.53.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Sep 2019 06:53:33 -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=A1ru8zBW; 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]:54898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Uy4-0005qF-KB for patch@linaro.org; Sun, 15 Sep 2019 09:53:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59380) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9Uub-0003cr-1v for qemu-devel@nongnu.org; Sun, 15 Sep 2019 09:49:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9Uua-0003iI-1p for qemu-devel@nongnu.org; Sun, 15 Sep 2019 09:49:56 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:38589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9UuZ-0003i7-S2 for qemu-devel@nongnu.org; Sun, 15 Sep 2019 09:49:56 -0400 Received: by mail-ed1-x52f.google.com with SMTP id a23so28568248edv.5 for ; Sun, 15 Sep 2019 06:49:55 -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 :mime-version:content-transfer-encoding; bh=YAOhFzzxz8Wer64d+m0cXxodZOyQ32EAoZ5iMqeSp6A=; b=A1ru8zBW65YkdBpXOmkxIDGN0XMsbpUfPuGVw3zI1YYY9bNA5t/k36Okg+4vgnWBNQ vmh86tTzT1gVR5AtXvuuJhqWlG5FSusg3+yA2ATNpjQ2LNebskgnSUy6mq7hmiiJSvVi qVANW/HXDNhBtnJENeEoAVNzkeHfv56KX4NaQoGQNuqZfleCm62BgX9u56opNFoz8eXn orpUBTpICFOk6LU++u5dAQqF5ItWiySaEUnJCUZFyPpKlXh81IifJuDw+qYE7FZlHIuR nM6bFKGc9+7/0zfxisyUpCAdC3xxrrwEkVzFLGsfvACsa2HGXyXAav7BycLFPbtoY7tJ wneg== 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:mime-version:content-transfer-encoding; bh=YAOhFzzxz8Wer64d+m0cXxodZOyQ32EAoZ5iMqeSp6A=; b=Ut8BR7qOvXL/TI4igOmlqz5Yt5NeBHyBJTrI3ZsoTMIL+tx05CiQwTeLWyV4Kapmua xoIDhZ3ulXG4k9AmP7pAkBe915/ynEixhPiOsrBBFR62S4eYV8VPiItTLFAW0cPlquR1 WdHzsSdGa2yWrFaLoBnvjLQqEZfoNCEFAgtZe9GDpFCm8XuboBZxCX2h+wse3KxRpDJh vDvCw7iNKlb431Y/YlnQKOdHdo6AMwaH1MA8ayMUgWmJ4hlLIPj3JeCsRqUJOMkSVFcP bHV4Lk/tgPP4bRLjfo1GysWHhDW+ycwlsWHUbLRPsDFjqGAJ/k8rYerwTs4PpSh+8/9l VXVg== X-Gm-Message-State: APjAAAUHI7jNHH3KLSmiVeKPdDroALg+BasIS0chbzQXNG1xzWWWrqgv c5MZFf7UKWPFgR+pvW5qpuzp0GnIpWPYaA== X-Received: by 2002:a50:9625:: with SMTP id y34mr20450366eda.72.1568555394667; Sun, 15 Sep 2019 06:49:54 -0700 (PDT) Received: from localhost.localdomain ([185.81.138.17]) by smtp.gmail.com with ESMTPSA id ot24sm123053ejb.59.2019.09.15.06.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 06:49:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 15 Sep 2019 09:49:44 -0400 Message-Id: <20190915134944.2173-3-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> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52f Subject: [Qemu-devel] [PULL 2/2] target/hppa: prevent trashing of temporary in do_depw_sar() 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Sven Schnelle Message-Id: <20190913101714.29019-3-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index b12525d535..c1b2822f60 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3404,10 +3404,6 @@ static bool do_depw_sar(DisasContext *ctx, unsigned rt, unsigned c, TCGv_reg mask, tmp, shift, dest; unsigned msb = 1U << (len - 1); - if (c) { - nullify_over(ctx); - } - dest = dest_gpr(ctx, rt); shift = tcg_temp_new(); tmp = tcg_temp_new(); @@ -3440,11 +3436,17 @@ static bool do_depw_sar(DisasContext *ctx, unsigned rt, unsigned c, static bool trans_depw_sar(DisasContext *ctx, arg_depw_sar *a) { + if (a->c) { + nullify_over(ctx); + } return do_depw_sar(ctx, a->t, a->c, a->nz, a->clen, load_gpr(ctx, a->r)); } static bool trans_depwi_sar(DisasContext *ctx, arg_depwi_sar *a) { + if (a->c) { + nullify_over(ctx); + } return do_depw_sar(ctx, a->t, a->c, a->nz, a->clen, load_const(ctx, a->i)); }