From patchwork Mon Mar 13 18:59:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 662696 Delivered-To: patch@linaro.org Received: by 2002:a5d:5602:0:0:0:0:0 with SMTP id l2csp679122wrv; Mon, 13 Mar 2023 11:59:40 -0700 (PDT) X-Google-Smtp-Source: AK7set/Ji7gXiqv81eTm3GDEX4raANgmBO5v+aR4FQvfrnLxjEVllmdhVPGVTk1OfhLtXEKjESCm X-Received: by 2002:a05:6214:1d01:b0:56e:b009:69a3 with SMTP id e1-20020a0562141d0100b0056eb00969a3mr17964529qvd.18.1678733980737; Mon, 13 Mar 2023 11:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678733980; cv=none; d=google.com; s=arc-20160816; b=AJN1r7Se0m6euAbJDgJK20Zhse4UDWOMfYhjRzFNGehRfa5FwSXWi/k2+2BAOQc6QJ i/OcnemHEvKLDn8yeQMS3lP0gfWf34uN0sSU1zr/wZwfNmf6L4yx78ZlUUrMTe8FSX/T YLSxeeQT97o81k0Xays4G1NaNWVFbzxQS+HpcOc4h045+OY+x9RpTXVSk3vEpWCBwoij Ai7IKfOJaZq+u7+SgQyO8243qZtdU9BB5Gm8QM9A+p9e41gGGUCgqWKZD7X4YTCtAOvr e4o0Q6yx37vI3TBTd96Qi6/Xiq0QWCHreNoywqCNookloFv4PkwRo7jnqdNDrZAQKt93 zW2g== 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=MTMJ+SrhxZD4DKXmnrOsTcVGLhAtWwxOjLuwczOyqDU=; b=q6yHYusrlENvPieXB3mt1AL3/4Oi9nGBdLJtHK9gWdNowAUyQNQ1N34Bda+mQ1ynOT R3unEc9KQLB+RtXgh0k0mI9XcC5VaXwNhxydi9C32ujEOUnHJCcRgsqG7hhifTZAgxZ7 xLdFhFq8iydS17iF5EApHPfvK9vESjzrI0F2s7BIMxJYh6QXJAufa9MR/mixd/+3xVzP 7qF92taetmV5+fgkKGoPLhZP59wwAnVgtEBPtBDty74M4OFV2HZnzuJwQRtNhYuOVW5B ZgZ2VbSrwkcMvFAi0KPnX8WFW1cjFybBQACy697CosXFjqyLA3Wlc+TsnWirO56ojeGI bv+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cCvYtFLb; 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 de8-20020a05620a370800b00745b44f0d68si229261qkb.247.2023.03.13.11.59.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Mar 2023 11:59:40 -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=cCvYtFLb; 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 1pbnO8-0001cq-9V; Mon, 13 Mar 2023 14:59:16 -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 1pbnO2-0001bp-CW for qemu-devel@nongnu.org; Mon, 13 Mar 2023 14:59:10 -0400 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pbnO0-0003X6-PZ for qemu-devel@nongnu.org; Mon, 13 Mar 2023 14:59:10 -0400 Received: by mail-oi1-x231.google.com with SMTP id bi17so10184732oib.3 for ; Mon, 13 Mar 2023 11:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678733946; 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=MTMJ+SrhxZD4DKXmnrOsTcVGLhAtWwxOjLuwczOyqDU=; b=cCvYtFLbFts8HhwVpsz0wVhGEpdonvapAu64bNoZUPXYcR1AFghs/QpldkgDdJLm+x mT2W6Y6IyO2trR43fOSWREf+Uk9gkHS9WSTl7AForemh82ASB3W5IJ+7LgGPzvZI6fPl f7+PuoOcGlk1mf/zEHRoCb6aFK34oomsROnt0ZPY9RTSf4XK00Shbce6eGQaxzNTFfDl 3FoapUFTv/p08+uLj3H2pieydPuYKblDsJGz48jqEKMgY+uJZBhFaTTRMq/++qZIEGKO IWHwynWsUvTOeW7T0+RKqBRFqGqyCqcTHGrrpiEfAwuRR6gRcUkAzzglC1tE1gF+9+Wk 23mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678733946; 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=MTMJ+SrhxZD4DKXmnrOsTcVGLhAtWwxOjLuwczOyqDU=; b=MXWCWI5bX+UYd27dhiAYTuzKJIQGqhXyurCFcSztp9vMC8fOgj4LOZEgAA+pHhuYWv Ndorh8j8L1VEbyWaRamgEM1DHAph1m5t7K+FzqIvIAEmFpAdyv0ZhVVoKBJTrIP0Jxm/ fWq42VnQ6Tt6Fji2Km2NHuZL0OIXA48/u0dCNrpla5EObVabiZCykh2owwsd0QO9O10W yqlRXxI4ebRdSyEwk78wJwHH5j8KVw9oM+VKcr8k+RYr2E6G/wHE8SuRCrRYbkQ2DdnR 26sJ0oYqeX8PdjCsqGLfjeWS9FZsDs/Ez+52TgisVB7UyebT2bnuM6CV3NSFUEy0l4wf 9MjQ== X-Gm-Message-State: AO0yUKVgOLGPKo6nPak4WxWQqD0B2aqUuApxJowjGm4ESfP8HrXT0kX9 Nlfj2VEqhWpPySbx/EGSF8evjtKnXmfj20S3Pp4= X-Received: by 2002:a54:4005:0:b0:384:10dd:41c with SMTP id x5-20020a544005000000b0038410dd041cmr15747467oie.49.1678733946689; Mon, 13 Mar 2023 11:59:06 -0700 (PDT) Received: from stoup.. ([50.232.40.61]) by smtp.gmail.com with ESMTPSA id i30-20020a4a6f5e000000b00525ccc4caadsm245044oof.4.2023.03.13.11.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 11:59:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL v3 73/91] target/arm: Improve trans_BFCI Date: Mon, 13 Mar 2023 11:59:03 -0700 Message-Id: <20230313185903.400351-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313185903.400351-1-richard.henderson@linaro.org> References: <20230313185903.400351-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x231.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 Reorg temporary usage so that we can use tcg_constant_i32. tcg_gen_deposit_i32 already has a width == 32 special case, so remove the check here. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/translate.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index b70b628000..2cb9368b1b 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -7261,8 +7261,8 @@ static bool trans_UBFX(DisasContext *s, arg_UBFX *a) static bool trans_BFCI(DisasContext *s, arg_BFCI *a) { - TCGv_i32 tmp; int msb = a->msb, lsb = a->lsb; + TCGv_i32 t_in, t_rd; int width; if (!ENABLE_ARCH_6T2) { @@ -7277,16 +7277,14 @@ static bool trans_BFCI(DisasContext *s, arg_BFCI *a) width = msb + 1 - lsb; if (a->rn == 15) { /* BFC */ - tmp = tcg_const_i32(0); + t_in = tcg_constant_i32(0); } else { /* BFI */ - tmp = load_reg(s, a->rn); + t_in = load_reg(s, a->rn); } - if (width != 32) { - TCGv_i32 tmp2 = load_reg(s, a->rd); - tcg_gen_deposit_i32(tmp, tmp2, tmp, lsb, width); - } - store_reg(s, a->rd, tmp); + t_rd = load_reg(s, a->rd); + tcg_gen_deposit_i32(t_rd, t_rd, t_in, lsb, width); + store_reg(s, a->rd, t_rd); return true; }