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); 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)); }