From patchwork Fri Feb 5 22:56:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 376987 Delivered-To: patch@linaro.org Received: by 2002:a17:906:48d2:0:0:0:0 with SMTP id d18csp2575100ejt; Fri, 5 Feb 2021 15:02:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbqeykKwelQdwlo6BUn8HhJa2oTZ22plO1jESwxpUep6LQONGF1mHk9nQ17/+Lv3LSaG20 X-Received: by 2002:a25:7785:: with SMTP id s127mr9145697ybc.170.1612566150421; Fri, 05 Feb 2021 15:02:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612566150; cv=none; d=google.com; s=arc-20160816; b=KScZI0zgI5bc3zJ3Ka+fa0gOROgs9koLD4ypUOY/kN18Drrfs/VxwD0Iogl5SAI3SN f1B67CcCmyPMvujWfKwl1LZJqHXNRGxRUf5m2c/pjDXcvC3AFpBEeKrTD4OHCYnApcVv +LM6ze4ihQCL9eqlaCjpCQ1CLNaGs3WrP7ZniOth3YILO86Tq2deQZXcFQZ8oJJXVrq4 Qhw9HmPxMKb5xIQPDA0hSgBUuvgCNKWOl+ucVIv2Wapj7DEpu35/iKtzQ4RLKf/v4GUs Z7TWsN47eD5SlImWi8TnbLACo5B8G9sCiFe2ZLv5jU+efvFe0jlkzEFLzvAGg3bz7iLg 2+OQ== 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=rQnZeltFcMCYQ9xe609eFENXoL/masnHJpQsAf4wZNg=; b=ValqI16p9KO6LoGDs4xsg8ESJxn1mish6LfKlFpwd0CdNvcULmlrYIFYl+3IOqtREw KFMXmyxJrKPU/0mkwevTh/VcxEIo7PEX3mrSZ3biSOoKwv6fPh75E2S0INqpZRFcTWzd vt59NHRv8/BMywcqkwwSAGD8HemLTHegEmMWtvWLAj5Ayexwalvg5G5sjivBRTCLS4J4 yA0pZWL0vZvkbrz9YXU8cx+HYRlESJLOeuuhkh13gYPt3UnwAlDNclJsDfuSyB3osxWW /zGqyLpWTiOl8c/LpJw5FSRdfuwFMmOnLBZ0GhZPEGTcj4gm2TqVGeIAiKoU0s6no7vJ TQUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GHNqfpXS; 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 c184si9903741yba.487.2021.02.05.15.02.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Feb 2021 15:02:30 -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=GHNqfpXS; 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]:56080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8A7R-0008MV-SO for patch@linaro.org; Fri, 05 Feb 2021 18:02:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8A2A-0001Hn-Ma for qemu-devel@nongnu.org; Fri, 05 Feb 2021 17:57:02 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:55621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8A29-0003B0-2y for qemu-devel@nongnu.org; Fri, 05 Feb 2021 17:57:02 -0500 Received: by mail-pj1-x1032.google.com with SMTP id s24so4425143pjp.5 for ; Fri, 05 Feb 2021 14:57:00 -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=rQnZeltFcMCYQ9xe609eFENXoL/masnHJpQsAf4wZNg=; b=GHNqfpXSHIROClfIVl+N/5pYROaVcWeR8tjhC2QVA9ges6CHZjlY9wQprFjkoB7Z4m xpzxJfe3/ATqE6gIQzt4bNMEfC+jUqdkdUHXUmzKK2Zp5dU5DaDCbwsjmIkrSQeuoBhO TJyg0Ut1LyjVqMfQoSkq3ZumfLzjpLSX92yI0NhUTI73V2LZAk7Qxj+FuErMYtzuwg7L JAexHw8Y2VzlZJ1UtFiFhxTwcfiv83Le+5yVk5sK/1xzIQEB+mCQqWyYL/fvzXLIr9cM pUPvktZx5wehsXRLRLsNS8hB69zIWarlCdIK+nrgLFQXNghhMUNysz1MQyCRlYO0c3bO CxMQ== 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=rQnZeltFcMCYQ9xe609eFENXoL/masnHJpQsAf4wZNg=; b=Mj5cw3aN4a2TYqIpJhtCb0frYR9C2tyVsR8eey4wE8XPOkKM+MlnMjk0UwugSJHubu eoh47FjtGFI7/YY8iogtf6Nt0wN0lemhZPk4Ud1SvYrI3tN1okRUbGrlyRdOfK2dnjFw oQtYpRxE0znZ0EIFbJ7iYNDc6e2qTGdOD39vIrITS1atma1N1AY/X21TTr2oJjYceH3A p0aE4rdfawb8qlsmaxVjq8GjPvGnB49BH/BwukKlRrR+K4mr/a26vP8BW/0nmYanPU8V Ssv86QpR46jOywYUiQ2yovUZI4StaBGmi+QIXNBZtJaZ3xD7ejYPHa+qFbwAuRIDLqb9 3EcQ== X-Gm-Message-State: AOAM533dbOql+Y02OzOnsNSutecRZHZs2frhweftHeV1HI9N+QZjLhcR O9716/PHd5J2RhZc9e0kiPn+namPwxqZo6dd X-Received: by 2002:a17:90a:7608:: with SMTP id s8mr6275860pjk.105.1612565819751; Fri, 05 Feb 2021 14:56:59 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id c23sm12155149pgc.72.2021.02.05.14.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 14:56:59 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 03/46] tcg/aarch64: Do not convert TCGArg to temps that are not temps Date: Fri, 5 Feb 2021 12:56:07 -1000 Message-Id: <20210205225650.1330794-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210205225650.1330794-1-richard.henderson@linaro.org> References: <20210205225650.1330794-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Fixes INDEX_op_rotli_vec for aarch64 host, where the 3rd argument is an integer, not a temporary, which now tickles an assert added in e89b28a6350. Previously, the value computed into v2 would be garbage for rotli_vec, but as the value was unused it caused no harm. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 3c1ee39fd4..1376cdc404 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -2488,7 +2488,7 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, v0 = temp_tcgv_vec(arg_temp(a0)); v1 = temp_tcgv_vec(arg_temp(va_arg(va, TCGArg))); a2 = va_arg(va, TCGArg); - v2 = temp_tcgv_vec(arg_temp(a2)); + va_end(va); switch (opc) { case INDEX_op_rotli_vec: @@ -2502,6 +2502,7 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, case INDEX_op_shrv_vec: case INDEX_op_sarv_vec: /* Right shifts are negative left shifts for AArch64. */ + v2 = temp_tcgv_vec(arg_temp(a2)); t1 = tcg_temp_new_vec(type); tcg_gen_neg_vec(vece, t1, v2); opc = (opc == INDEX_op_shrv_vec @@ -2512,6 +2513,7 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, break; case INDEX_op_rotlv_vec: + v2 = temp_tcgv_vec(arg_temp(a2)); t1 = tcg_temp_new_vec(type); c1 = tcg_constant_vec(type, vece, 8 << vece); tcg_gen_sub_vec(vece, t1, v2, c1); @@ -2525,6 +2527,7 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, break; case INDEX_op_rotrv_vec: + v2 = temp_tcgv_vec(arg_temp(a2)); t1 = tcg_temp_new_vec(type); t2 = tcg_temp_new_vec(type); c1 = tcg_constant_vec(type, vece, 8 << vece); @@ -2543,8 +2546,6 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, default: g_assert_not_reached(); } - - va_end(va); } static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op)