From patchwork Sat Jan 7 07:51:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640083 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp1179906pvb; Sat, 7 Jan 2023 00:12:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXsD8IOVTmyxSuhRta5kkUzu22uZHxD0BfPjhMSrIqfoQ3o/aks6LdesvF0Rad1zfhKSwlGr X-Received: by 2002:a05:622a:4d0c:b0:3ab:d932:6c4e with SMTP id fd12-20020a05622a4d0c00b003abd9326c4emr5279821qtb.18.1673079128118; Sat, 07 Jan 2023 00:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673079128; cv=none; d=google.com; s=arc-20160816; b=LRZzP4rVSx8NMOTPoPLYo52rqEmYboWOOQQxuMj0y/qIjx/JyHSb357ARuVsG6B0im Bbu+fGuUBFvY/ohWiF/aPnVH1UI135yEq+2WKW+jTogSKVLcTUJirJ4eVJhtBSeWuikN VZkT3MbVYJCBAX2GU7x9Jmp9sfQTLf0YAsOHr5d0uGAV6YQynAvUIhBVr7nwM2hgzeT4 S7Zp3rowZU8Ot7+i9GSj5k4yOR3cR3ZWNUF8yzY/SdZcDIr+C0Z7uXTuE6ZjGYoXbwQi fUE1FgzX4+SFR+QgNJWxmj4WZ/UD2vUnSLhYSz6looO1AgaE+pcwy8pHYT7+PNPKJlF5 j/qw== 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=YF0GWpx0dC/UYYXWm5/mP8VhAPYVOiMc6soYwoN6xvw=; b=oGBR/hJzz86eGfqW5UcVSVy4uEF/IoOmVdyUGJXOdnjq85bqaJwk0MGcJxiOwpZs3t rzxPoVRvSEPY5SuCUtromn4OoMyPIVBfsiwdtaFcp55jey8IjCfvtaIcaRwmfwzzvEWU iqrSAYAmauEJibEkSBWGX5oNryI+9tLPk1WWAVyIbaCZ43bA76/h9k0KmyAV9SOVOI99 4c0QKRRNA7JdoobUC9NbMSyQGkoksjmVUP6dUqKJ8T/RI+dR9Ibw6R2Ygp+5P6jsTNmL MnloBSkg214LkUt+M/S/a/mhs1AVXvaIRioa02r9t+q712UBNyY414Jcfc7pkyv3iC1u 3LBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="khihS/Ec"; 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 z16-20020ac81010000000b003a81705a0dbsi1950654qti.579.2023.01.07.00.12.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jan 2023 00:12:08 -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="khihS/Ec"; 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 1pE3zT-0003jt-Js; Sat, 07 Jan 2023 02:51:43 -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 1pE3zJ-0003g2-Gi for qemu-devel@nongnu.org; Sat, 07 Jan 2023 02:51:34 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pE3zH-0004D3-P7 for qemu-devel@nongnu.org; Sat, 07 Jan 2023 02:51:33 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d15so4073367pls.6 for ; Fri, 06 Jan 2023 23:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=YF0GWpx0dC/UYYXWm5/mP8VhAPYVOiMc6soYwoN6xvw=; b=khihS/Ec2+jMHENhQtbrwwbPGUN71VJKVKGs1FFTzvBDE83e4jNUA7AOQdw3ZsMOFh VWp/LjFBU5381AYqiyfp2jNOb6w06nBogTIsy2a8gUhjuYvlY2iAzr2bzD2nRJXwZidn Xy2ceUmB3EovNSnZU3VYgnXQt9btZdRuROBh2VlarBDE7xJ0LsK+RDRCHG5DeGTIg2HW tIVREYfmB+akO6t7UnIeTCXM6cey6LJj1sa3DUBhFZYcPKbtU1ydeNCqzcuC4d/NX1yj jarrdSuEuhcei+Qg7x0vBJ1ycS3UmXlZnqAawxC4p5dtQ2qNmx3R0Bd074HTK8/OXvDj xWKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=YF0GWpx0dC/UYYXWm5/mP8VhAPYVOiMc6soYwoN6xvw=; b=sYoy2NMa4YHJE1X4t5K186PHor0ntIdZ/CbRMIjal7DuDlCrk64zYzZqieG/8xE4uP 12nQfpwGBWAZfOBcKlk2yETAtyCIsVle3/QcbxNKg4JKGpk3HMjRU0uz91Gy5e7UN0Dl 8frA9fduG4SByhOgQ30JAcouv3A54r/clma5NNmxJxhCDAvdHTxHw+KIOmx0pLKh56n+ 5EWyijiewjuYVrQrsghFHEL1EoxfTpfkiWb0k8tryMP6y98M7ts+FnCyIVna6Do8aQAO oY5r7UlGnCeYQ8QdRPw68D8AT7yzm8l/9tZl0TuJ+L21ydiTH0PpFk978HDJeTJxXQb5 /d4A== X-Gm-Message-State: AFqh2koqQ8Acylh6qfpMOEcLux4OVaqz/z4bJjIxvFdNSDso4sNfpZsV 6UYRGpcoUdYJvi4E5ivEX6euEV/mqR2alX0z X-Received: by 2002:a17:90b:4f4e:b0:219:89c3:2847 with SMTP id pj14-20020a17090b4f4e00b0021989c32847mr61252173pjb.44.1673077889509; Fri, 06 Jan 2023 23:51:29 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:9d81:5b04:51d7:acae]) by smtp.gmail.com with ESMTPSA id bj5-20020a17090b088500b00212e5068e17sm1945119pjb.40.2023.01.06.23.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 23:51:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich Subject: [PULL 10/27] tcg/s390x: Remove DISTINCT_OPERANDS facility check Date: Fri, 6 Jan 2023 23:51:01 -0800 Message-Id: <20230107075118.1814503-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230107075118.1814503-1-richard.henderson@linaro.org> References: <20230107075118.1814503-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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 The distinct-operands facility is bundled into facility 45, along with load-on-condition. We are checking this at startup. Remove the a0 == a1 checks for 64-bit sub, and, or, xor, as there is no space savings for avoiding the distinct-operands insn. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 1 - tcg/s390x/tcg-target.c.inc | 16 ++-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tcg/s390x/tcg-target.h b/tcg/s390x/tcg-target.h index fc9ae82700..db10a39381 100644 --- a/tcg/s390x/tcg-target.h +++ b/tcg/s390x/tcg-target.h @@ -62,7 +62,6 @@ typedef enum TCGReg { /* Facilities that are checked at runtime. */ -#define FACILITY_DISTINCT_OPS 45 #define FACILITY_LOAD_ON_COND2 53 #define FACILITY_VECTOR 129 #define FACILITY_VECTOR_ENH1 135 diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index dd58f0cdb5..e4403ffabf 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -2218,8 +2218,6 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, if (const_args[2]) { a2 = -a2; goto do_addi_64; - } else if (a0 == a1) { - tcg_out_insn(s, RRE, SGR, a0, a2); } else { tcg_out_insn(s, RRF, SGRK, a0, a1, a2); } @@ -2230,8 +2228,6 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, if (const_args[2]) { tcg_out_mov(s, TCG_TYPE_I64, a0, a1); tgen_andi(s, TCG_TYPE_I64, args[0], args[2]); - } else if (a0 == a1) { - tcg_out_insn(s, RRE, NGR, args[0], args[2]); } else { tcg_out_insn(s, RRF, NGRK, a0, a1, a2); } @@ -2241,8 +2237,6 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, if (const_args[2]) { tcg_out_mov(s, TCG_TYPE_I64, a0, a1); tgen_ori(s, TCG_TYPE_I64, a0, a2); - } else if (a0 == a1) { - tcg_out_insn(s, RRE, OGR, a0, a2); } else { tcg_out_insn(s, RRF, OGRK, a0, a1, a2); } @@ -2252,8 +2246,6 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, if (const_args[2]) { tcg_out_mov(s, TCG_TYPE_I64, a0, a1); tgen_xori(s, TCG_TYPE_I64, a0, a2); - } else if (a0 == a1) { - tcg_out_insn(s, RRE, XGR, a0, a2); } else { tcg_out_insn(s, RRF, XGRK, a0, a1, a2); } @@ -2926,9 +2918,7 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) case INDEX_op_or_i64: case INDEX_op_xor_i32: case INDEX_op_xor_i64: - return (HAVE_FACILITY(DISTINCT_OPS) - ? C_O1_I2(r, r, ri) - : C_O1_I2(r, 0, ri)); + return C_O1_I2(r, r, ri); case INDEX_op_mul_i32: return C_O1_I2(r, 0, ri); @@ -2938,9 +2928,7 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) case INDEX_op_shl_i32: case INDEX_op_shr_i32: case INDEX_op_sar_i32: - return (HAVE_FACILITY(DISTINCT_OPS) - ? C_O1_I2(r, r, ri) - : C_O1_I2(r, 0, ri)); + return C_O1_I2(r, r, ri); case INDEX_op_brcond_i32: case INDEX_op_brcond_i64: