From patchwork Tue Feb 13 02:21:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 772256 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp58775wre; Mon, 12 Feb 2024 18:22:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWKctU29B7hN1Ybg5nxEpV1/LWmm0aa8ISB19sOpG46NFgoKReyUKUMgz3P5seZrd3qAVN+CXFvipnUiJJrnPAc X-Google-Smtp-Source: AGHT+IHIDecHEbb/Lf/v+7gYAuRUaNYsKphgOg9Nq1fjwPJxClmLmbiDZWOSD7HIXwa5GnL7303u X-Received: by 2002:a0d:d382:0:b0:604:788d:267f with SMTP id v124-20020a0dd382000000b00604788d267fmr6387787ywd.6.1707790957599; Mon, 12 Feb 2024 18:22:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707790957; cv=none; d=google.com; s=arc-20160816; b=ScX2swetxCNm/xbb9P+gJGObsHQUNliuflVcpB/5CAdGgZn3VOZC4eIYlq74vKNjra QnnJr+U/v2noyQuhE9iIjQ5m9NKjVq0dy+Th/kU4EPtJywINNGPrrtTk8p7fGWUiHlzn K4c6bs0OLZaU0KqcZNV9ZsgqKML1gppP6JACOULUNWkOxjHBEm1NSjLif9EwJ8sZaEBx kEayJnsuqyRhpDO+8TgS3rBCgH/ogg9I8nwKuwZiB3lYOHxgS1ozEQy3eD+HNCVBUi3U GfQT6r4ur20MJnVfsTpSYL5a3Irwk62aWPKu/qrG5GL/NuipZWRvuVeBWLwytK1uPlQL YkwA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=BzYkBIWK10dkyqgOm0oclP6Z4Ek0OOCRcVEVAcYHx/A=; fh=j+HOcWQQ46GRmm7wHoHYp/+En4U7YtEZxpIGqbHObHM=; b=KNvzZUnznp30F2dhMgUaDhkNdy2lLZ1+Bmi4E+6avMWBBcKrzkZfFV+6pGCFJ7D9fK zf6gx1TmE2/Tk5CkJCYmPq3QZn6Q54GxqhRgqfrkxKltBB7RT2MPUitLhNtiH5A27CdS pVUpP1xfDLutz9T25wM0f/1lq2F9DXPx9WJcm84TBF5WR5XpmmczQ9CTfOrD5wrfrS3j p1d92J7eqbALmA63SPMKx8USpcnyGoJoMNjAaphWDOjcZXHQA2UXf6ik2VyrahlZZTfQ Q/OgO0c/mewhd98chs+orkGwy8GN2SiJnyJZJVhyK2TxGS2lgYL3nXvdLHqv6MPpx0qp qHkA==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nOuQDXx5; 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=1; AJvYcCXLPNxR4SlrXQ3LAVVy5m1eH00DOICdGQbEPk13FdyqK95Dp1JKufhZGbL95RaVEX1rIhbNZyLHfdD6iP8cMgBB Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t23-20020ac865d7000000b0042c4c5c2ce9si1749282qto.390.2024.02.12.18.22.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2024 18:22:37 -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=nOuQDXx5; 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 1rZiQW-0004if-Sp; Mon, 12 Feb 2024 21:21:40 -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 1rZiQV-0004iM-ME for qemu-devel@nongnu.org; Mon, 12 Feb 2024 21:21:39 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZiQU-0007yZ-6E for qemu-devel@nongnu.org; Mon, 12 Feb 2024 21:21:39 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6e0507eb60cso2461295b3a.3 for ; Mon, 12 Feb 2024 18:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707790895; x=1708395695; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BzYkBIWK10dkyqgOm0oclP6Z4Ek0OOCRcVEVAcYHx/A=; b=nOuQDXx5nNg+AdATNPPrBAswNVVoolbD1iiPJDFLoiycllK0DtHDV0RWZdFSK8XOkp s5HPWn18rSpKBUzG+4nYYQZcikFs/xwNRFSqL8YWmK63um0aqqKGqcnyCE/26ATShTw0 Nwwgmy4UTsh5iJRuW+0NL5Cts3hArsd0zjiGrBG0/dk2EIdq25OxM7l7Dujde/+/sTYw iRBR0HCCpvFR42x4dChQRy+rO4W6FzM48NRQyFhY/iRb8nqaJmOFB2hXjrvWY9SOONIl yrMyq9B0l/jqg3dJcs0OwVZTMBVC+6FGCttzWnf6eDL7twfPYF45ptHp8v7qkhI4RNTX XyLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707790895; x=1708395695; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BzYkBIWK10dkyqgOm0oclP6Z4Ek0OOCRcVEVAcYHx/A=; b=rzX+qWgZTx0EjCHWAsnBqmwugQqH+uCLCgTx4Tk+NAb2OHF2HHitYsuI2W3VoyXxJF EO+x8w3HMoAqrN0WY57l1zsukEU39+k6muJhMy9iWSehZbmpp/uHmZJRAWXDma9zDOU4 /ebhj1DnrCglG81iK2s6eRd1eQob8xb02gIwBbbVyjP1zZBLQkSFUefBJCUw4B4FEU0Y C3+qjEe3ZJx60pCFpO4hQ4zZlKRdoKD2KPeLutSNj+NNySVMoCUL5QUvJrtMm1FBWxPm OPVanN3AW1i9Dg8sB3arAiV4b6pvF9hpK1L7EQQJAm19Ewi/yJFQqFHl2UGG3BGnOfPW puBQ== X-Gm-Message-State: AOJu0YyE1ioL1IpuTFaJqg/asQ50AiFbQj2RVh+p5UdDJZoz9vq2JQcB QrEmLrNNw7NY6nhoNmyiGEU5Xa+MhOKOmfVukGSxXh0wPuZ7tHGt/Ix0HgDfcQbIEubX0U1RNRV Z X-Received: by 2002:a05:6a00:1398:b0:6e0:a3ff:2079 with SMTP id t24-20020a056a00139800b006e0a3ff2079mr12848914pfg.20.1707790894698; Mon, 12 Feb 2024 18:21:34 -0800 (PST) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id e26-20020a63745a000000b005dc26144d96sm1144354pgn.75.2024.02.12.18.21.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 18:21:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PATCH] tcg: Increase width of temp_subindex Date: Mon, 12 Feb 2024 16:21:32 -1000 Message-Id: <20240213022132.116383-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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 We need values 0-3 for TCG_TYPE_I128 on 32-bit hosts. Cc: qemu-stable@nongnu.org Fixes: 43eef72f4109 ("tcg: Add temp allocation for TCGv_i128") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2159 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Tested-by: Michael Tokarev --- I feel certain that I made this change back when I introduced TCGv_i128. I imagine that something went wrong with a rebase and it got lost. Worse, we don't use temp_subindex often, and we usually handle i128 this value correctly. It took a quirk of register allocation ordering to make an invalid value in temp_subindex lead to a crash. --- include/tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index daf2a5bf9e..451f3fec41 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -412,7 +412,7 @@ typedef struct TCGTemp { unsigned int mem_coherent:1; unsigned int mem_allocated:1; unsigned int temp_allocated:1; - unsigned int temp_subindex:1; + unsigned int temp_subindex:2; int64_t val; struct TCGTemp *mem_base;