From patchwork Fri Jan 19 23:22:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 763960 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp109341wrx; Fri, 19 Jan 2024 15:23:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFq2OeaLp4leWanrrk/eJ5hzmBu/RsQKj52hJia9i2wj3Gp1efn0Jd5bX5Auooz6WK4SXdo X-Received: by 2002:ac8:5c52:0:b0:42a:1ee0:e9e0 with SMTP id j18-20020ac85c52000000b0042a1ee0e9e0mr541289qtj.0.1705706632978; Fri, 19 Jan 2024 15:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705706632; cv=none; d=google.com; s=arc-20160816; b=x39vwP/cDPf8DujBifdilXh3+7S0s6iWds+RBtdwvj8055eJdKtjGg40VkyraxxX+P hUj4tAKst4WMRFfioq4YBohsWQNiOlZGvmvZgVDM1YOKTkvyEIOZ9Uv4O0A2uuV84jMI aWagQEcWNtp1xkp1A0h2NxZVb5JCnnq9E+LpzLUzTQ+jCm5wU+nNUr4TRhgT4MUASo6v yTBaJ8qFA+azKlsGDushnwFut0caUVSStOE5TrpTKkGCBIPq0WnDYCJmYyCHDe7kBfd7 SirK9DIuqZcB+YnDYzpRev53cUWhcbjWLi1y7hhDcl/NKmveHLplBf+xueMbiXiLAJmf aitg== 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=choCcd5gHzMHamKyAS0rgRQ3ZokOOEbOjiuYNvJxvuE=; fh=04ycLKTWno9tnkGng2eIaNWueAwLX2fvg2ZFcmhcji4=; b=ulWnXe2JjnMFRe2R8R9XVWNtXS5HHCzABrOOI3gCn8neBt+BwxOPOjj7WhtGMvITwA D5F9uYaTsjBLbrZ+UubRGHws2qU9MneRKsbJeaO07t2Ov0XfdTfSWcHQsGCeSbIIJnx/ jcExFD8FicOgQzRuKtTm31CUy4U3d+YJr1H8XzfL1M2mXjGkfeZ2QMCArd4j5kjdev3/ tbZqM2BAT2oM12HOE/h1KeRR49jY6ndAVtqtrzlaIK4Ph1xD8+LxEHYYsFjwqBWyST6t bnXa/gJt2MU/iCebaSrfevlHiJl8LiMvoNXD84/0qEMZsZ75bIYh6sQ0m5EKybiDN0Os Wb8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u7Yypr09; 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 v10-20020ac8578a000000b00429ab23e30esi310417qta.688.2024.01.19.15.23.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2024 15:23:52 -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=u7Yypr09; 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 1rQyCi-0000V4-8g; Fri, 19 Jan 2024 18:23:17 -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 1rQyCd-0000TM-RJ for qemu-devel@nongnu.org; Fri, 19 Jan 2024 18:23:12 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQyCc-0008Ff-7V for qemu-devel@nongnu.org; Fri, 19 Jan 2024 18:23:11 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40e800461baso14328965e9.3 for ; Fri, 19 Jan 2024 15:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705706588; x=1706311388; 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=choCcd5gHzMHamKyAS0rgRQ3ZokOOEbOjiuYNvJxvuE=; b=u7Yypr09BjZnqsOoSIRqt+GcM+05BAPZ2xTP3wg/935GIrT2o6LIdn+ZK6j9HDXbfJ lZsK/ObHCb73sNQ0faNLBepZEuoYYk2CFrGE2ozuM6JKkeHHpLkXJjsCcbzfnHxiQrTN E5Cdn5REi4pc18k+/8O6ISVu7QSPYcoYi7LaCBR3Eam8++oH+5DfqSC6pwosXlW1SMaz q9Cwps9UvzEd/HceRy6x0UU6X5ioBlcyAERdiFK5GXlHHB2GU4ibIaV3vJ7HTNIpyDwm aETWgtPFxZPPhE+g8E8xLh6AlzodtwLlaIOXFrCNhbFiD6GaWI1FO96PiututB07ShoX ceNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705706588; x=1706311388; 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=choCcd5gHzMHamKyAS0rgRQ3ZokOOEbOjiuYNvJxvuE=; b=m18bVFYIZZl6oDtCgiQyB7J5pJ15fs1qVeMxituZCoc2Qasl2mOn5gjY7MMNwbVxgg IzScDYxFwtdO32EG4UqIE3BtWZYfAi8f9R/RgW8wEDIbW40ddI1LA0xQidpyrGF9HtKF XSPG9j46PBX99yQ6DpnYzbb9hE0asnmMxGZqQ+mA8U1nXMdBvMQqoh9S8iQ5DcrY5hBK rC5lR7ELUODFhyrn7ylN0YnhxK43WongYctyxU2gZVxoV1CU1x1DcJdzBVzeoIEN2JoX /BPRA5A883UnNk+kWTUUoHLZb4NKtQ7/FqPQtd8dNUYm7GuUuLMBl11/cEcjNgn9Wwyr G5DA== X-Gm-Message-State: AOJu0YyW/Wz57x6d318ov+68AV35ynzjUqm6TwfNoZtrOV2o9345kQAW 40hOTY95N9Kc3Umq1NA0ayaBQs6SMaKTgDyMqmnfYSP9Sh6bejYoGX/NJAtImHm31tt1wwudW09 F X-Received: by 2002:a7b:cc94:0:b0:40e:4863:6c21 with SMTP id p20-20020a7bcc94000000b0040e48636c21mr132736wma.341.1705706588394; Fri, 19 Jan 2024 15:23:08 -0800 (PST) Received: from localhost.localdomain (91-163-26-170.subs.proxad.net. [91.163.26.170]) by smtp.gmail.com with ESMTPSA id j21-20020a05600c1c1500b0040e9f7308f4sm2904997wms.10.2024.01.19.15.23.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 19 Jan 2024 15:23:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , David Hildenbrand , Thomas Huth , qemu-s390x@nongnu.org, Ilya Leoshkevich , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 15/38 2/6] target/s390x: Reorder CC_OP_STATIC switch case in disas_jcc (2/5) Date: Sat, 20 Jan 2024 00:22:58 +0100 Message-ID: <20240119232302.50393-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240110224408.10444-16-richard.henderson@linaro.org> References: <20240110224408.10444-16-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 Code movement to ease review, no logical change. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/tcg/translate.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index e84c6459f0..aedce85029 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -886,14 +886,26 @@ static void disas_jcc(DisasContext *s, DisasCompare *c, uint32_t mask) c->is_64 = false; c->u.s32.a = cc_op; switch (mask) { + case 0x1: /* cc == 3 */ + cond = TCG_COND_EQ; + c->u.s32.b = tcg_constant_i32(3); + break; case 0x8 | 0x4 | 0x2: /* cc != 3 */ cond = TCG_COND_NE; c->u.s32.b = tcg_constant_i32(3); break; + case 0x2: /* cc == 2 */ + cond = TCG_COND_EQ; + c->u.s32.b = tcg_constant_i32(2); + break; case 0x8 | 0x4 | 0x1: /* cc != 2 */ cond = TCG_COND_NE; c->u.s32.b = tcg_constant_i32(2); break; + case 0x4: /* cc == 1 */ + cond = TCG_COND_EQ; + c->u.s32.b = tcg_constant_i32(1); + break; case 0x8 | 0x2 | 0x1: /* cc != 1 */ cond = TCG_COND_NE; c->u.s32.b = tcg_constant_i32(1); @@ -926,18 +938,6 @@ static void disas_jcc(DisasContext *s, DisasCompare *c, uint32_t mask) c->u.s32.b = tcg_constant_i32(0); tcg_gen_andi_i32(c->u.s32.a, cc_op, 1); break; - case 0x4: /* cc == 1 */ - cond = TCG_COND_EQ; - c->u.s32.b = tcg_constant_i32(1); - break; - case 0x2: /* cc == 2 */ - cond = TCG_COND_EQ; - c->u.s32.b = tcg_constant_i32(2); - break; - case 0x1: /* cc == 3 */ - cond = TCG_COND_EQ; - c->u.s32.b = tcg_constant_i32(3); - break; default: /* CC is masked by something else: (8 >> cc) & mask. */ cond = TCG_COND_NE;