From patchwork Tue Sep 10 21:23:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 827042 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp512575wrc; Tue, 10 Sep 2024 14:24:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWFteA3SecvOqR4LR2TGJCobxGLLitsJkVoGLmgwec/t6SQm+fVkZdlizM9lxdcJ2gGgHQjEA==@linaro.org X-Google-Smtp-Source: AGHT+IFKCc8aFaJRq1RPN0RKkE4q59Hsi18wtsk3zhZrWvfxFjR1f+TJgzsbAZ/I236LJaBG14Xk X-Received: by 2002:a05:620a:28c5:b0:7a9:b38f:98af with SMTP id af79cd13be357-7a9b38f9a0amr1469072085a.47.1726003457180; Tue, 10 Sep 2024 14:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726003457; cv=none; d=google.com; s=arc-20240605; b=UXGDgG0IXRv4Orab7pjyhKoWA4e0N6vbbZb19IlKQtQpN8+u08MsIYzGynlkcmnMz0 5+VibVqW6zehzLlNIur7NYBBYgr++OQ4Oq/gxWkhcocsrEQAUTV/FVN+ljcvoZorTp6b vx46QNDlMYXaPFz5cGkTWPsM+0RKl51pQT507BRf/O3XJx6m1JhGojdTk1uObEEGBL82 g4POejRCcyFxcwdiZQgFj06ve9jYIGgbqFZCUzS2AMGBFsoeAXp+27+vrcVtT8JzP2cT fRiRQwKcCTxirkquMDtb+OXI/HRP1r3IQ0qfHAPx+kqiSWQtuHehxuO155dSosVS3bkC u3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=T80UPj+qhu7ZvuwY7K7ZmyNGsP2DUjUnk8vZcnVrlpM=; fh=F+xgrd1ht63kc5fxqFABYqQkRp8zxi1zdTlIodjTtn4=; b=eeNAQoowy7UsODz1aS1NQRwVxUd7ld/jWJI/KqFS3BVeZgRlYtlptzj8xuTi8Dz0dN EYe9G3N4Jc+aTjCCCD+5hbFlnJqqlTog7dp0ZqnPTdvT5DGhnWHyTUu4SgCv9IapdQQr DN3eOKyqWTZ0jJIaUHgsC56NXACM8JkU9E/g7nnsRmx4q6fIYg4k0MQVoLApQmkb4LWS YEF6fpWBIaXnT/sIQKxOGAK98uQIz559i4E3b/FdOfAXOGJ/4SDVagZsyBtOsY3MJm7B vta0c31eJkvSzyXw/FIP1fQt0PkNH8ApuWx45FqcpY4xU3fHPY8k2ewVWkFIHZ4RiYA9 D1Bw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="leJvHV/k"; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a9a7a539fdsi911562885a.542.2024.09.10.14.24.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Sep 2024 14:24:17 -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="leJvHV/k"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so8L7-0002S9-KK; Tue, 10 Sep 2024 17:23:57 -0400 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 1so8L5-0002Ke-Na for qemu-devel@nongnu.org; Tue, 10 Sep 2024 17:23:55 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so8L4-0001vU-7h for qemu-devel@nongnu.org; Tue, 10 Sep 2024 17:23:55 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-718e482930bso2284111b3a.2 for ; Tue, 10 Sep 2024 14:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726003433; x=1726608233; 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=T80UPj+qhu7ZvuwY7K7ZmyNGsP2DUjUnk8vZcnVrlpM=; b=leJvHV/k9LgajSoW7wWeYIT+lwxq6GII836i8aGIxjVQws7TF7gYVSfzmeL3uacDR1 xxm9r3xmrDYLzB3xLCeOveRvp3Em2FJg6bZfCnw8wbBcfN0SIOa06T4IBWzDCBq3Fxvd X5jENwkV7XbK83l4j+Bo+mDajO2eD0SbFJ9HWXbtk2LIPityF4qN6NvUV10agCwSpBg4 YqCxJAS0k7irW3e1dtxZH0MSGPWcqcu0klNzPDUvZ+x+9CPVr8XkcfbdLHo9+aCXzMb5 ZrHIQWHk5Z3O/pJtYJcBK5UtYTvARvWBVQuIlHBBsfuwPk2sJZIzAKV0GgnqtGEvz/rX Vl8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726003433; x=1726608233; 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=T80UPj+qhu7ZvuwY7K7ZmyNGsP2DUjUnk8vZcnVrlpM=; b=I8zP1jycRp8aIN8aIvtYC+u37wAMZtmKqPQq/yZosfBhHGVYrMKgaS6b4/GEey3wie w0zKJ7nXiTyRftdnoMq35iP5656+gtG6kRXm8guWBQqY7NRTDmQ+lZ9Qs/3AHesh+xSd zIqHzqM+SFaQnkEznVNxh6uSZw2657JLhR1ghwK/nE4zY0DAggzle4TK1doEXUDPomSQ FPxADCEg+kLP8IB0i0qdJHkx98vJOipOUoMVUxgtTdjaNIDw3JE4zMhu+PKM+f6/124p DwCGeB56ZwEsY3ae+6SlMoxM4Rxa5P3sQ+ItFWRN7yvbf41JpgN+YaUEz32S1JE9vLbI Z74A== X-Gm-Message-State: AOJu0YzWWZ4VdmTyD1vkspzW59khLCfAzD5PTVgDVQVOOdrq2D6U//Tf WjLBVHY785813RchyHwLtUftqYz8T14fvd7egh6Sbe7FlSKUSJYlQNXVJdw5pnJz3z06A0cWZAg i X-Received: by 2002:a05:6a21:392:b0:1cf:5b31:313a with SMTP id adf61e73a8af0-1cf5e0307abmr2884246637.1.1726003432532; Tue, 10 Sep 2024 14:23:52 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d825ba616bsm6089661a12.93.2024.09.10.14.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 14:23:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, pierrick.bouvier@linaro.org Subject: [PATCH 0/2] tcg: Fix branch/label link during plugin expansion Date: Tue, 10 Sep 2024 14:23:49 -0700 Message-ID: <20240910212351.977753-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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.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 With tcg_last_op(), we always get the last op of the stream. With TCGContext.emit_before_op, the most recently emitted op is no longer the last op. Instead, pass the op being emitted back from the allocator so that we can link it to the label without needing to look it up. r~ Richard Henderson (2): tcg: Return TCGOp from tcg_gen_op[1-6] tcg: Propagate new TCGOp to add_as_label_use tcg/tcg-internal.h | 12 +++---- tcg/tcg-op.c | 86 +++++++++++++++++++++++++--------------------- 2 files changed, 53 insertions(+), 45 deletions(-)