From patchwork Tue Jan 7 08:00:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 855445 Delivered-To: patch@linaro.org Received: by 2002:adf:8b05:0:b0:385:e875:8a9e with SMTP id n5csp100629wra; Tue, 7 Jan 2025 00:09:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV92n4YLySENyQDWUEiaidBAeFuMEx3y2lZeICos8yeGLGe23r5ccoaGysr44T/xWWQ+dqfiw==@linaro.org X-Google-Smtp-Source: AGHT+IGnx3emTWyTgwgTcVhqgyelOgwT5Lge1PGemOlajlL5xpI/00wWBt3HSy+rvjQqoX0L2LJR X-Received: by 2002:a05:620a:1a22:b0:7b6:d5a6:18e8 with SMTP id af79cd13be357-7b9ba7fdeb9mr9037537685a.50.1736237399506; Tue, 07 Jan 2025 00:09:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736237399; cv=none; d=google.com; s=arc-20240605; b=RTpfeL2YIGkIOKdx9ciiZ+LPJguxcGbVLDf8yg2QIa88VRq7AlUePuhAhc74qsyfUS nlMPNUZkeKNYiaRP9Cxq8DoQFVFWGpPhbp5AcI1pPTc81zRHn4dJal9iSz0nt3TrVmuQ miTutuwfrnB6FlOdKPd6u1LcYLM+5YWBOW/eG54b/lnpRcLbNOLXE5Mp5nwSZR+mLb44 SOHpz28L4FpRpaWE3OuN9b1Q6NNIZUT1ri6SosdajbTpCDY6UUdQFYh386YsIQ6ak8Ud Oq1mdbZ3Qg9q5GZxAu4Tgr2fF5rXKRViR/mYd3U3FmrTH4Gm7Qo4Oxh3yxBqp7yoOSDJ dTAw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RqajPiEMeewZ/ExVhfmIDevyFwt0jBlpqC4kux+VJ8g=; fh=1AaLZNOiARaO2MErHmdWiM20H44tzxxDYMw0tHmbGN4=; b=Dnnk3MT+/zeSwtO0rm9RKjmzWJT+eq6+3DBVZK4jPB+ylFWYpXiK3Zw7A3vmOOW7hi 9oBemV0GHeoQ8gdBOJ4WnRdq9yDpF4ECqe9arq4E1kXLN7b5Uka7YJ0qlXq76FKRQhmN fs/hXk47X6RaDEE6yHCQ1plz8vladEOQ/9oQdvGJFmi8/38gy1+f/HkyV1eX1aPSmo8H ZSaHElUDj2y6ebQHfYJ5ZCyoqDA84UozVNUcMcFZNipnOupEnmHvE/lHYI6dA8911fPK i1RVqjBc8OdsDhlCXsau8iFm6g9HYPuqam6Oo0/Ra2fyI35iQKaORtROQVmhDqpjfS63 aUcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vsh8ZLgg; 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-7b9ac2cec9esi5112559085a.157.2025.01.07.00.09.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jan 2025 00:09:59 -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=vsh8ZLgg; 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 1tV4Xj-0001Ll-Ox; Tue, 07 Jan 2025 03:02:27 -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 1tV4X6-0000KR-2N for qemu-devel@nongnu.org; Tue, 07 Jan 2025 03:01:49 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tV4X2-0002yL-9y for qemu-devel@nongnu.org; Tue, 07 Jan 2025 03:01:45 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2164b662090so194871245ad.1 for ; Tue, 07 Jan 2025 00:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736236902; x=1736841702; 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=RqajPiEMeewZ/ExVhfmIDevyFwt0jBlpqC4kux+VJ8g=; b=vsh8ZLggchr/g1nBGZSmiGu6iVaKqQV2AGMpTccG5bdgajlz4UjLskAsZ3pbCN4EDh kO4eiHjiWC9xkib90U2czaP9go4xgMax1nbbdnMZ3Xc5LiCw8LGLWv2osaEqlib3emhA 1HXD2oB1/v1WoP/p9W0wqjECRscBBDfTz2ZG/SaTyZiWK1Mys2GLOgsp3u0eYzVj5IW+ QbAbT6hzXttsj7wdGClvDYs9PyKN5sVbROibZpppn1AW14EH/CXf8szr2ae/EzjVLZnQ JP+8/yeiwpSP2ORfn6eaY6yM94M006eRmwGb5sOAq4D2RAE/uUf9AkHTUhNkV9pn35mc gMYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736236902; x=1736841702; 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=RqajPiEMeewZ/ExVhfmIDevyFwt0jBlpqC4kux+VJ8g=; b=AaD7t4wQa2s74SDKscW7MnXeON+sewsdPFgInwUVShe6PmTz4eNL9JCO3Rd/iIw6Qf JQUwbp9ShZIqBb7n3aVGCqNVhkk3H0K5xiBZcMtbv6xXKFbuLm90IrDKygXzKeoZl8OS GDc1k5Fx614KRx+mMG0fFNBLidY4Ic0n3aSoUKQ5Gf2gK8XN7f2aiL8tb83ryL6303ss hrR5ihx2AgWCjPhQbdd203A+qMATtyOQ12wOO5RCEUQir6wcbcjk26fio/VdU8O/IS81 mHCZq2n7s651K9CeS8hkMinfi+NvPj/5mVcXQoXpfrslAadIfzHWkRwV11Iiw8xZrBE2 16UQ== X-Gm-Message-State: AOJu0Yz9adlQxdFf0ADEnBLb7C9yzGgk7mrSjqFB9V9jBb7hqbZ5HjlN kzNlIoxK1a2RnsYv7S03CPzSbQFv3LhImEXYUbWf4NIsWjc6lOP5ypWlKdoUrKJ6qEuzmZn/P7F L X-Gm-Gg: ASbGnctSSvCmcH+a6gdoS1X1CqpOoMtvo9eII77Fgp7m4TCi2kVO2YqFFnJlULq2uPL CdyTHKDLFVpxG2JM1exv1K5Z/LnQTbSmSpXcKamqJKAHfV3mmsDwzhvt1qZ+bbHlGngO9aKk8Bf aTGfHnwAXlw704iXImce/u+Etbk3U/lPaiU3GR0ULmpDMh5t+EmEx6YZukmljZZRAFq7w91JDBE noTu8ZnXCumwLIdc4I2eai8NGAnrFtXUn9+3Kt3v6BcDT1G4wXZZDj6fxK+HuP82adfBtLNPSGA W7kjt9b+ZaWxZeAizQ== X-Received: by 2002:a17:903:24e:b0:216:7761:cc49 with SMTP id d9443c01a7336-219e6f26251mr892534115ad.47.1736236902482; Tue, 07 Jan 2025 00:01:42 -0800 (PST) Received: from stoup.. (76-14-228-138.or.wavecable.com. [76.14.228.138]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc96eb12sm306765995ad.87.2025.01.07.00.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 00:01:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org, pierrick.bouvier@linaro.org Subject: [PATCH v2 27/81] tcg: Pass type and flags to tcg_target_op_def Date: Tue, 7 Jan 2025 00:00:18 -0800 Message-ID: <20250107080112.1175095-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107080112.1175095-1-richard.henderson@linaro.org> References: <20250107080112.1175095-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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 Allow the backend to make constraint choices based on more parameters. Signed-off-by: Richard Henderson --- tcg/tcg.c | 4 ++-- tcg/aarch64/tcg-target.c.inc | 3 ++- tcg/arm/tcg-target.c.inc | 3 ++- tcg/i386/tcg-target.c.inc | 3 ++- tcg/loongarch64/tcg-target.c.inc | 3 ++- tcg/mips/tcg-target.c.inc | 3 ++- tcg/ppc/tcg-target.c.inc | 3 ++- tcg/riscv/tcg-target.c.inc | 3 ++- tcg/s390x/tcg-target.c.inc | 3 ++- tcg/sparc64/tcg-target.c.inc | 3 ++- tcg/tci/tcg-target.c.inc | 3 ++- 11 files changed, 22 insertions(+), 12 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index cf6d881945..b971909c3f 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -866,7 +866,7 @@ typedef enum { #include "tcg-target-con-set.h" } TCGConstraintSetIndex; -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode); +static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode, TCGType, unsigned); #undef C_O0_I1 #undef C_O0_I2 @@ -3375,7 +3375,7 @@ static const TCGArgConstraint *opcode_args_ct(const TCGOp *op) return empty_cts; } - con_set = tcg_target_op_def(op->opc); + con_set = tcg_target_op_def(op->opc, TCGOP_TYPE(op), TCGOP_FLAGS(op)); tcg_debug_assert(con_set >= 0 && con_set < ARRAY_SIZE(constraint_sets)); /* The constraint arguments must match TCGOpcode arguments. */ diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index d1e08def60..9116f85667 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -2962,7 +2962,8 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, } } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index b4cd36a9b8..182cac1a8a 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -2124,7 +2124,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, } } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 813c12ca0e..64826c7419 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -3627,7 +3627,8 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, } } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 686b94ccda..2f0d4d01ff 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -2191,7 +2191,8 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, g_assert_not_reached(); } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index 199bd97c0e..b89b279a0e 100644 --- a/tcg/mips/tcg-target.c.inc +++ b/tcg/mips/tcg-target.c.inc @@ -2151,7 +2151,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, } } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 3ce4fa1db6..1e7b8a204c 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -4140,7 +4140,8 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, va_end(va); } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index 51cd7e7586..432a2fe26f 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -2583,7 +2583,8 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece) } } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index 98925b1d5d..e09a726ecf 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -3207,7 +3207,8 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece, va_end(va); } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index 1201607722..48de490120 100644 --- a/tcg/sparc64/tcg-target.c.inc +++ b/tcg/sparc64/tcg-target.c.inc @@ -1532,7 +1532,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, } } -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 74b649c902..662acbdcb6 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -36,7 +36,8 @@ #endif #define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_NORMAL -static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) +static TCGConstraintSetIndex +tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags) { switch (op) { case INDEX_op_goto_ptr: