From patchwork Fri Feb 2 05:50:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 769143 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp753838wrc; Thu, 1 Feb 2024 21:53:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsxpLmn1fYg5vxZgR2dgQo+EUw1eWT7fOO4RIabSVBGQ6LSUJ7Ks+nqYPkGnIq1N9fFJOE X-Received: by 2002:a05:620a:5658:b0:783:6943:26d9 with SMTP id vw24-20020a05620a565800b00783694326d9mr4701498qkn.72.1706853180462; Thu, 01 Feb 2024 21:53:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706853180; cv=none; d=google.com; s=arc-20160816; b=GBm9nIrtKwpM+Gc0wkpiy+vouTKQSO+gdiXbAfr8ofCQqShB8yoE5Jqi7aZsWL44JR JaoolurnalAb4YPjAW2lM8x0zBttscuwY/AlycCDPsL1dwjl9vwROptMstKakbaI+DfL d1K9EO54Lis3imzOagjZc7ly4w7kpQArANFE0N/zDg7AsE4GlGC/O992D6U7xs/aUkdq r9nHZ7iVNmAih0IN1JFDUIXN2zrMIi8mknU5nUrmB3b1k4Gu4Ju3vfGiscz/dxgWj/en h9w2DLa5XyyyWTUEREKGCkgs+BafQQbNn8ZJOlUpVkoMxPtqNqy8BEIOG1Wc5QkJ1A6r uNJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=enqyHM/qlHAKrvGyjKOBiar72kS5zHVgEoJYNNdlxDQ=; fh=PkK5L0DznoYbx0KptFlTL33liqit0uFoW44EG7YY+ec=; b=qmpOSYsBbwjeT9uFbq3/+dZDhRgot3HbKT0PJjxT5A01QVWtBFwTvYR6caXOo8MX4c luoFQ+frJ1xb8N4vtmWlb8lzqHPhJZGddVlPNWrND+7FxmgBGVZCj2a85IQXFA7w+0ZJ KIR3R+9TQhjaa1uXfe2KQB0lbHVWpALlZcLXn2zm+S2OQkNbJl01ETitBUnXbyYe6sQ7 p4gQ9hriHabxwDMvgpZV/LXB+MCOoivK4QINpE1n3YYqCd5cCgGFiZcGUZBd5tHuW9Ea 2HpkqugD8SWTlzMQK4f4s6UoJMpsSykBtA8dbM2ID+0pD/LVa9h6mrRr+wStXpDBqmAA Xu8Q==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JXxiM572; 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 X-Forwarded-Encrypted: i=0; AJvYcCXOCv+0WCuC17NiK4JLCYlWZNkVGaSltz9niTyWpACcZ5/O4qr4+l4gV99cPW4/0JwJL8NBlciicJBR8L7rcmQ2 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n4-20020a05620a222400b00783da608917si1232440qkh.246.2024.02.01.21.53.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Feb 2024 21:53:00 -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=JXxiM572; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmT5-0002o4-HQ; Fri, 02 Feb 2024 00:52:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVmT1-0002UZ-UX for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:51:59 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmT0-00027i-2a for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:51:59 -0500 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6ddfb0dac4dso1335739b3a.1 for ; Thu, 01 Feb 2024 21:51:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853117; x=1707457917; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=enqyHM/qlHAKrvGyjKOBiar72kS5zHVgEoJYNNdlxDQ=; b=JXxiM572DonvC6pArZSCdO9ss2EdgaYX4Oby+VV0dfvqEkVm74IoH7KEh9wVPoS9j/ 7Ekb5ehy+NIntaYl09LA8WnbT+uQQjKoT2sjz8Q9yvqkykYqEhmV/N9h0oHgO87k3gyz NDvWwtsxYJN7a95y6cZYbQiXjVpOxwguSFm1/qNv0JvNXZRJSZIrtc13YwQc38QZvQax UEW46OzHK0117lMBDVlcZaa/UDvDX4qfl8bS8RxiWchOp4SYsBwfrZieBW5Kj3PghsOR AWckP7Yv6Td27j2FHeb/Rfh3HwxJFlR51gFRse025uqcB3T/4aOosIwuHbVza5CuVTsd drMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853117; x=1707457917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=enqyHM/qlHAKrvGyjKOBiar72kS5zHVgEoJYNNdlxDQ=; b=oYVWoxCVT3Vgx9bFJCWG8ztqbAil6U4w/xIa/CmZ+ll7EM/TjwQII8bgDIeaOkFBDT 8HxPf/npsUlryTf9jG8sTCDXVHnyuQasv8ZUQSECs72TPyeFCviIms4s1EV9xtMPdXWG 5fqzQVme/rKhVCMMR2EbrYrN34XGl8d/EyZQNBT5CDfkwgQr5yJWwZr6gJgjda5LRsr2 WV8R7tXyPn/ONgQaPO3Z+lEMcS91OqhU5Wsj2/ZzfzkDXPKQnDHfOSEv1Wd5DbRg9P5+ ku94uDf94Opo0/O5gnxTthc6cI2d4clLDlP7/xBtMxkkG54GAtscWN0aC4fiUFdn6OCA dbjQ== X-Gm-Message-State: AOJu0Yz61p1Zg8ZECz5gTo9AUBLAE08oRAOaTdOozH776ujZWpwuPraC pFG4B8aFHb9MLCTrkmfZZqYqqBgfFAQPOB4p4ufya2wbX9PL6LINJxvYPS/i0Eq5zRK5zZ9TnlR nAV4= X-Received: by 2002:a05:6a00:23cb:b0:6db:d978:9047 with SMTP id g11-20020a056a0023cb00b006dbd9789047mr8634401pfc.1.1706853116815; Thu, 01 Feb 2024 21:51:56 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVK//GlkMYx7LaQShTPiCXe/LPvnqxRn4jv2adJfhkGn5Na3Hy/8W+8VmaHIFaGC/PfEs492ETnUQkJMi9N5Pt/HVo2 Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id h2-20020aa79f42000000b006dab0d72cd0sm715111pfr.214.2024.02.01.21.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:51:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Song Gao Subject: [PULL 35/57] tcg/loongarch64: Set vector registers call clobbered Date: Fri, 2 Feb 2024 15:50:14 +1000 Message-Id: <20240202055036.684176-37-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Because there are more call clobbered registers than call saved registers, we begin with all registers as call clobbered and then reset those that are saved. This was missed when we introduced the LSX support. Cc: qemu-stable@nongnu.org Fixes: 16288ded944 ("tcg/loongarch64: Lower basic tcg vec ops to LSX") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2136 Signed-off-by: Richard Henderson Reviewed-by: Song Gao Message-Id: <20240201233414.500588-1-richard.henderson@linaro.org> --- tcg/loongarch64/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index bab0a173a3..dcf0205458 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -2327,7 +2327,7 @@ static void tcg_target_init(TCGContext *s) tcg_target_available_regs[TCG_TYPE_I32] = ALL_GENERAL_REGS; tcg_target_available_regs[TCG_TYPE_I64] = ALL_GENERAL_REGS; - tcg_target_call_clobber_regs = ALL_GENERAL_REGS; + tcg_target_call_clobber_regs = ALL_GENERAL_REGS | ALL_VECTOR_REGS; tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_S0); tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_S1); tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_S2);