From patchwork Mon Feb 20 18:40:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 655129 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1554012wrc; Mon, 20 Feb 2023 10:50:06 -0800 (PST) X-Google-Smtp-Source: AK7set9vjMJVEjpD/1a2HdEIAQNdqyc8rZkCmGfM5WMeW3+ql6KzO2zE0kcPL+jeLfBosxVShtRo X-Received: by 2002:ac8:5b06:0:b0:3bd:6c0:9c8e with SMTP id m6-20020ac85b06000000b003bd06c09c8emr1800215qtw.2.1676919006366; Mon, 20 Feb 2023 10:50:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676919006; cv=none; d=google.com; s=arc-20160816; b=cMh+/Hbd4FA3+KecL2p1++6k6E1H5XjAsLK5q06DEfJyPn1UOLpl3UKCdVVouuGwWk Fo5UaG2UWxMm3Gonw1hAAKPeAaOzFxR6q69vRQFR9Vk4SGlyQ27aRj/s6VVJX1X8zRcG qGhjSLJikLUFFEGc3Qs0LZvhNb9eOsA0+/p/qYlPg59AvFFBPfqG6yjo8rB9kr07Im2W bTn/Tt40J8Spr4X59+yMzD4SswFi66x6gKFrUN1jMzk0vEgHDvuoughm3ZNjB1vQZN0e YL8xSUmCdg9rKFmgp55t7MjrldtoW1MrXH/HGQbL9NTjjMIICWU+DVRkIxI3A9kBtPAY RM7g== 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=zXucR7EhGSIkydzJkgAPzsrJnH+F7Rth0vxWHmdJQnQ=; b=Kr5Lg2RoEDIqM0BoRs+SeHuwt+G0L82UC4uXQQvaytdDHeRbzEtYDBYPTLtw6JwM9p 6H7EbP0Fs6ddGOJtAP6VM1MpTDAv0j3xVEeirdS9LHuJjFhNWNE0MaPo2TklnOBPlAbH p0lMZNwbij4fxXgrgWi+HIW0y3tXTot6gZV7VILhMRfiSpYXn9bnO+VEjHHJFtK7DtOS msbNu0jQjFfY/JnEYVQpwWNw0xz5l5E1dsRXvaihVki/QuIPhKr5Kavt9BvqIKci+EIv +bnwwb9zRCtyTyEG4tceUpUEY+n8w+zuJ77RvKGyDAYervkQPNfchz6WgcR7yV0prJPG HmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bDSr6QIz; 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 bs39-20020a05620a472700b0071ba5585985si10157946qkb.571.2023.02.20.10.50.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 10:50:06 -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=bDSr6QIz; 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 1pUB8d-0008AT-Id; Mon, 20 Feb 2023 13:43:47 -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 1pUB6h-0004fs-Hg for qemu-devel@nongnu.org; Mon, 20 Feb 2023 13:41:49 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUB6f-00045g-1W for qemu-devel@nongnu.org; Mon, 20 Feb 2023 13:41:47 -0500 Received: by mail-pj1-x102d.google.com with SMTP id v3-20020a17090a6b0300b002341a2656e5so2185771pjj.1 for ; Mon, 20 Feb 2023 10:41:43 -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=zXucR7EhGSIkydzJkgAPzsrJnH+F7Rth0vxWHmdJQnQ=; b=bDSr6QIzXMYj043tHO5s67GZFOqATw1crtbpC1JPqXHxNpPvvmLCKZASbvkrMcRUhW P3yGLiMObTSAxTZvcyZIwQc7+cXp5BJEbmeuyhUnW6VaOj5ugP0wYzOePiZhGjDJDqTm MznwTOySea9C64uDUSM9uTaBVWp4kbOyL1jqAQdA1d8zA4/6/VF97y8yMQlSiFs5zWO2 PINT94RWEZwwT0T2m24dbOtIPOruywBHn3dUEylNsLVemqC+1z90eNCHtlFyWMjwqWOx 6t0WiStzVTztOhTiCcHqrKJiw9suDsa7NZ7cPzYKtyjpYmNuy5B+KFlUexOw/c2I53Bw nOVA== 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=zXucR7EhGSIkydzJkgAPzsrJnH+F7Rth0vxWHmdJQnQ=; b=Q9ENZmwH14/xfq//X/cwA9CkzD/SW82VHkdTEid7rMfxKWudGMX/nQ+IWaLPoHbDY0 mQS3fNPqzjYsNnXjyAeBuuOPsrhNHAtB5XPVOkhqxe2+F20G0ZCwJ4OXVG2RwmQ6sGLr mkGyJTn+kMVPtHJw4+jxE/8zmvCkIH3CWj/+hvXHwihyFRq3o2DLAXd3gmb0H8rSwQ5n 7gURPLn3qO9Y2avQb/I9OSWqSwWjEr6fBya/J0ZcSjcgZs6Q7A5GkU8XUBYdwH22IWry HkfQjW9h+aKRsJ/b7lvGzzpNkPYgFuKJB7NQjDTvuOhy4bA/qz02vI5LKMWbZgVL1awG sxwA== X-Gm-Message-State: AO0yUKVikc2IfUUD9J+6EB4mE3OWbQzwZKGGij8BjchAsQ9OCJvf049O Lzvs3S2xFUqrN1agFuMM4KLJ5Ua/79yJc7iM9CM= X-Received: by 2002:a17:902:e945:b0:19a:9a66:9030 with SMTP id b5-20020a170902e94500b0019a9a669030mr970200pll.4.1676918503242; Mon, 20 Feb 2023 10:41:43 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id jk20-20020a170903331400b0019258bcf3ffsm1911676plb.56.2023.02.20.10.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 10:41:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: thuth@redhat.com, qemu-s390x@nongnu.org, Ilya Leoshkevich Subject: [PATCH v4 26/27] target/s390x: Pass original r2 register to BCR Date: Mon, 20 Feb 2023 08:40:51 -1000 Message-Id: <20230220184052.163465-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230220184052.163465-1-richard.henderson@linaro.org> References: <20230220184052.163465-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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 We do not modify any general-purpose registers in BCR, which means that we may be able to avoid saving the value across a branch. Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/insn-data.h.inc | 2 +- target/s390x/tcg/translate.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc index 9d2d35f084..bdfc09db3e 100644 --- a/target/s390x/tcg/insn-data.h.inc +++ b/target/s390x/tcg/insn-data.h.inc @@ -121,7 +121,7 @@ /* BRANCH INDIRECT ON CONDITION */ C(0xe347, BIC, RXY_b, MIE2,0, m2_64w, 0, 0, bc, 0) /* BRANCH ON CONDITION */ - C(0x0700, BCR, RR_b, Z, 0, r2_nz, 0, 0, bc, 0) + C(0x0700, BCR, RR_b, Z, 0, r2_o_nz, 0, 0, bc, 0) C(0x4700, BC, RX_b, Z, 0, a2, 0, 0, bc, 0) /* BRANCH RELATIVE ON CONDITION */ C(0xa704, BRC, RI_c, Z, 0, 0, 0, 0, bc, 0) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 24d8d84727..e4db5f1c02 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -5754,6 +5754,16 @@ static void in2_r2_nz(DisasContext *s, DisasOps *o) } #define SPEC_in2_r2_nz 0 +static void in2_r2_o_nz(DisasContext *s, DisasOps *o) +{ + int r2 = get_field(s, r2); + if (r2 != 0) { + o->in2 = regs[r2]; + o->g_in2 = true; + } +} +#define SPEC_in2_r2_o_nz 0 + static void in2_r2_8s(DisasContext *s, DisasOps *o) { o->in2 = tcg_temp_new_i64();