From patchwork Fri Jul 10 23:37:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 235270 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp765490ecp; Fri, 10 Jul 2020 16:37:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze8NpYvEomCuF0glqde9bAbuhKEIdLIcpPaVn3eQTbidsALqR/+iYrtec5CdBO3qq3X9jO X-Received: by 2002:a25:38c5:: with SMTP id f188mr118338273yba.332.1594424279658; Fri, 10 Jul 2020 16:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594424279; cv=none; d=google.com; s=arc-20160816; b=CgAzkWf9Q/LbaRkw1xfJzMJXIbyzpmwsfEa7F13spvCMF6fKKq9sGKs+si03ot+jzI gbdkT4NabtIBgN5/CiV8r805UWBaNXt90SO0wq4NPT3AaMNIw9oDRnsjufzg7TnhMsGp NQOC0y6/nwAQZB3SpcQZlBhqaJi3SDCSo4nTU5KvhPbzrvR5kqjhrm4TgU4WEqYWzGF2 etBgEbkiv7aYff5HVFOxueEnsDP+efnlxChDuySB5IBzkNqjq5ge39df7Z2RJzEmPaj4 bXRLWHzFY/kQdMK/kq4Xhz1jXKT3BalTAJTrvJCaqjUfktCq+5Wss6Kn4VLNYeUmouMP /zbQ== 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:message-id:date:subject:to:from:dkim-signature; bh=WQIquz29/3Mrs8KUr9l4jEYupeyadrQoaBZ2fCjluGU=; b=0a6pkkubc6Fc+AC/YLt+fxPpmTSnU6Xf0ZnJadvHvPmcEjWLkhZuuXwaw6IvoWT4bF V5JvRrTlX530nKTmBcZZDIbV0PCebAUgOk4ciS8J3NUO1cGRnPrKvnSnCmc1FfImW9ZG AD3AtloQmZK3OMio3Tqb5nIhPdAS5PSMlzpY1FY/p4q9hyz1fGT6hYTjP/wuE8opMXHX rjTIqcdhzRnMj3OFuqc2TKQgoZ/bQek0rhS+BL2leN3gWTWC59Z8yr0WjBJbhWqXU4wv 7QFl/j1vfTEXBH9QruUMn1N8qWcg6/FZ4D1DagoBGq9YZk487mJnprkPXnhC1tDZFVqS W9Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TwKiIPkL; 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 l3si6162341ybl.247.2020.07.10.16.37.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jul 2020 16:37:59 -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=pass header.i=@linaro.org header.s=google header.b=TwKiIPkL; 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]:42366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ju2ad-0007yv-45 for patch@linaro.org; Fri, 10 Jul 2020 19:37:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ju2aU-0007yb-Iu for qemu-devel@nongnu.org; Fri, 10 Jul 2020 19:37:50 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:50522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ju2aS-0001jo-RG for qemu-devel@nongnu.org; Fri, 10 Jul 2020 19:37:50 -0400 Received: by mail-pj1-x1043.google.com with SMTP id k71so3253827pje.0 for ; Fri, 10 Jul 2020 16:37:48 -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:mime-version :content-transfer-encoding; bh=WQIquz29/3Mrs8KUr9l4jEYupeyadrQoaBZ2fCjluGU=; b=TwKiIPkLB049OzbPEaP6CU3m5yO1dUvja6BAohH5PHb0Mnnabb4MEJeujTQ5k6pas4 FZbWfeikMy28Rt9GnLNvS3Tn5YihyqV0szBNLNtooOpOHU1bGh7daOgHKPgmRJwa70xR 5zBWwyuR9l4YeOGDuFpEWhtNzR4+1qq5cCYfaYPrOnSNHfGMIt5XUB86TU4/z1S7FIHl LJGzSi7g/OFPT1k6Yl/NLoAX7cfcfaGHJuBgjFtfMnJuIMevNOuIetXDS/vMyMBkedNi 59JdtjsQSrDdGB+RrGbZ4upxSUNs8oGR9wymOYWNNqeSCQJAEBrN0mOmNJko8F1eiUOx rXow== 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:mime-version :content-transfer-encoding; bh=WQIquz29/3Mrs8KUr9l4jEYupeyadrQoaBZ2fCjluGU=; b=Ie+6O1YEgrQhWzzv54Nyr2I7l41Uxisl8R5tZ1+8IeNDMuB1o9nXtYeQfTPpucQhja d7Q9JnqQD+g3USSyj97iM8avTfUq+k7nuBfIJMFcDkQT780ar9973KM6BnqwWlZU5Hkp BNO4aXInw0dWCFKH3l+Xulzsm5PLBXwVlA0b1cPJGp9BZG2n41v5IHtixexp50LqATNC XALEVfmF64DvV5gPHNPkVPjaCzhoCG3pHCrem3SELE0bkUk/RNaoewQGyABZ0CTIjnvd u7JhfzGzNDxKtrJqCQCH1sx0+0EHpN03KzNpckmKCOW6qqaA+V0B4v+CHjDYm7YV20Ls QW3Q== X-Gm-Message-State: AOAM531hRQgTODUB12G/29jED3pZBULfBuqFB7L78OTOyKprgLMI5VUp eGRxZppav3VuSwS7NHc+qm3/IVWNn9A= X-Received: by 2002:a17:90a:c305:: with SMTP id g5mr7491809pjt.62.1594424266748; Fri, 10 Jul 2020 16:37:46 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id e16sm7097326pff.180.2020.07.10.16.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 16:37:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-5.1] tcg: Save/restore vecop_list around minmax fallback Date: Fri, 10 Jul 2020 16:37:43 -0700 Message-Id: <20200710233743.177884-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1043.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Forgetting this asserts when tcg_gen_cmp_vec is called from within tcg_gen_cmpsel_vec. Fixes: 72b4c792c7a Signed-off-by: Richard Henderson --- I found this while testing SVE2 (and the patch is included in the large SVE2 patch set), but it seems like it should be reproducible with master. What's needed is a guest vector minmax operation of a size that is not supported by the host. In the case of x86_64 host, that would be a 64-bit minmax. r~ --- tcg/tcg-op-vec.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.25.1 diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c index f784517d84..ed6fb55fe1 100644 --- a/tcg/tcg-op-vec.c +++ b/tcg/tcg-op-vec.c @@ -657,7 +657,9 @@ static void do_minmax(unsigned vece, TCGv_vec r, TCGv_vec a, TCGv_vec b, TCGOpcode opc, TCGCond cond) { if (!do_op3(vece, r, a, b, opc)) { + const TCGOpcode *hold_list = tcg_swap_vecop_list(NULL); tcg_gen_cmpsel_vec(cond, vece, r, a, b, a, b); + tcg_swap_vecop_list(hold_list); } }