From patchwork Mon Apr 24 05:41:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 676543 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp1988483wrs; Sun, 23 Apr 2023 22:58:36 -0700 (PDT) X-Google-Smtp-Source: AKy350a+U8gyxjBNosJzi3yWCR3zebWeN/yC6xAcWDwSMqDJTdAmRKVVAZx15YAIr3iUAGwJMQ1+ X-Received: by 2002:ac8:598a:0:b0:3bf:da69:8f74 with SMTP id e10-20020ac8598a000000b003bfda698f74mr22109168qte.39.1682315916641; Sun, 23 Apr 2023 22:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682315916; cv=none; d=google.com; s=arc-20160816; b=DEFyOT0takWeOucQI/hdeGC+EkVhblmi/yImFz2IKL5x3wtDZvjoSml1rBdHFZH751 J8VKyQkHIm6PJtHgpiL3vEy97hAB7PB1n+/r6Q8SBSmcwDHfOT5iVyNfhra/QzXBAoH4 C4sIQfjycK1HQpSNCXaXIn6dEB7rAjVHRVo3S4veZ0hTzXqs6Sx4zp+/69zbyof2Hhhi 5m7Ouk2Q8XAUlkaxwxp85uRxCmyuyWlpTTfNBv06ZQpV35iiOKs7HGJOWYF6lXoN2TVQ F5ugfm3dyrQQ+pUkkGzN80b/xmzkghHP7VT43j/KcUXGn9dwq+QlSiTdZfn+s9cDsHeM JNJA== 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=WrmqAOuR2/yJANGPopXn5FwM+vXCIwdTliCaNgd+uz0=; b=N1/vENRWoytGX+kAny8RqxkzB4y+rxNVjfH7OIbyWyD3QDcWo79r4C7Jq4cVll5PmI dBkSbccEaSc2TANJ3P9CrHC4UrCB9okAxzwHifihbOm2l8kxvvDwIWdYmJFa4fATjJDy vBPUaBIIR39aKd2Vq7Rbf8sgMPmvJuNhpsjDbDIKsiMCx7UrgdTqtaYexLyqoq4vIVzy izQyshyHUccXUJvzdL2JyfV/O8aDeXdGcOdrnv+OWlYYOyc7aP8nqWruic6IR/tsETd3 ZoeazgZLG6cnJ6dmSMnvCf7mu4jR64Bow2r042F73b+D3bcTJS69GdzJAODqgprZfvQ0 Jc1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=loIzhHVZ; 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 m4-20020a05620a290400b0074699678d4asi7059594qkp.32.2023.04.23.22.58.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Apr 2023 22:58:36 -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=loIzhHVZ; 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 1pqp4r-0006bB-8z; Mon, 24 Apr 2023 01:49:31 -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 1pqp0b-0006FF-4o for qemu-devel@nongnu.org; Mon, 24 Apr 2023 01:45:19 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqp0H-0005MY-Tt for qemu-devel@nongnu.org; Mon, 24 Apr 2023 01:45:04 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-2f46348728eso2305219f8f.3 for ; Sun, 23 Apr 2023 22:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682315079; x=1684907079; 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=WrmqAOuR2/yJANGPopXn5FwM+vXCIwdTliCaNgd+uz0=; b=loIzhHVZ8cgAyCUje2Ol0tC5Qt51NjEgcT4ZD9Zb1mlwqhk0tOlMugfWrtEQagx2wY qlw1gWu0L20Oe1mD+X/Cu1PUaIJPx5hT0Nc3AYOxMWStRTDn0GmixILlCWyE1l4BnG2K JyFl6h3Zj/bPkuiXJq1fZdiMW166ZnvVkh4AvFu0uVQLQXFdvbjYk2qrJDJwj/DGh0nR ViyYKW+q5Srv1AqV36Eaz0AcUSfD1Q6ZyCNlpSYyVwELChJUh1YCJQcsLQBqmgS6EpAu j6HqXMqv0n+Dp9qbp2SDhNprGk1g7cfhJemzPLI/j4IhSTVqzmFoU5x96cYcbQbNE53X xnaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682315079; x=1684907079; 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=WrmqAOuR2/yJANGPopXn5FwM+vXCIwdTliCaNgd+uz0=; b=SAHNFxyeaNsYReeL6LrLGETUiiqRkXRQS4rwbOVhMha7A8yZy7WpRyNBlU8QwV2rmo 7qTwb0Wpi/0VhN5KQPHRBx/CtAsxzilFnVM6DtlAphdG3iBcfZTpHjNF5fz41/hW3mCi CnO6oxsQuVR2UwUkKKCyXtG6FSvVTtcEbWYcUlzt/BOH3VQkJzdsI2hXFOL3sLdi3Yaq jFR4am0q28cY+FT508iFatY8OoExM7uvymLP5NTuN86pg2T5iLC3ZRhdkHbh/5P4awn9 g7BqAQ9WA7L9NLPgWJq+Cg3zFq61zVp3gko8BaBsp6bkn0VAi1h9OZeuhHK/8c215iVJ ySRA== X-Gm-Message-State: AAQBX9esdLREbtq8P2Fx0E+5oKuPHEgMxC4EG063MImAz4YHDhzafhcG X6HNAYlQ4kF8rSgUaPeHqZnASUhAfJghvFjfyJdFhQ== X-Received: by 2002:a5d:428e:0:b0:2f9:b08a:a3af with SMTP id k14-20020a5d428e000000b002f9b08aa3afmr7404891wrq.49.1682315079542; Sun, 23 Apr 2023 22:44:39 -0700 (PDT) Received: from stoup.c.hoisthospitality.com (cust-west-loneq8-46-193-226-34.wb.wifirst.net. [46.193.226.34]) by smtp.gmail.com with ESMTPSA id u6-20020adff886000000b002f7780eee10sm9986693wrp.59.2023.04.23.22.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 22:44:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, git@xen0n.name, jiaxun.yang@flygoat.com Subject: [PATCH v3 56/57] tcg/s390x: Use ALGFR in constructing softmmu host address Date: Mon, 24 Apr 2023 06:41:04 +0100 Message-Id: <20230424054105.1579315-57-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230424054105.1579315-1-richard.henderson@linaro.org> References: <20230424054105.1579315-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x430.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=unavailable 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 Rather than zero-extend the guest address into a register, use an add instruction which zero-extends the second input. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index dfcf4d9e34..dd13326670 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -149,6 +149,7 @@ typedef enum S390Opcode { RRE_ALGR = 0xb90a, RRE_ALCR = 0xb998, RRE_ALCGR = 0xb988, + RRE_ALGFR = 0xb91a, RRE_CGR = 0xb920, RRE_CLGR = 0xb921, RRE_DLGR = 0xb987, @@ -1853,10 +1854,11 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, tcg_out_insn(s, RXY, LG, h->index, TCG_REG_R2, TCG_REG_NONE, offsetof(CPUTLBEntry, addend)); - h->base = addr_reg; if (TARGET_LONG_BITS == 32) { - tcg_out_ext32u(s, TCG_REG_R3, addr_reg); - h->base = TCG_REG_R3; + tcg_out_insn(s, RRE, ALGFR, h->index, addr_reg); + h->base = TCG_REG_NONE; + } else { + h->base = addr_reg; } h->disp = 0; #else