From patchwork Thu Mar 9 20:05:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 661122 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp502869wrb; Thu, 9 Mar 2023 12:22:36 -0800 (PST) X-Google-Smtp-Source: AK7set8/R58HPEjozwQ69O8JgX33c00P/QCc909V3KG6CKmqOGeObxaSvq+vQAW3APCI82kSXHWy X-Received: by 2002:a05:600c:444c:b0:3ea:d620:570a with SMTP id v12-20020a05600c444c00b003ead620570amr453952wmn.38.1678393356181; Thu, 09 Mar 2023 12:22:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678393356; cv=none; d=google.com; s=arc-20160816; b=z9M+qKmSACyP6VTficupWrIzS7XUhqTuS1jwjkvfun4RMELRxOEGIiXkBjHDL+qPze hMtxuB2+CkOMavn8v3oMTEYatVqo909Kcmhhs0ho4EP+O9QHiyDaywcJu5kcXnHQc+Kh EVvFs6913N0AS1CcGr0bP61aG2PqQV94Cxr+QKIFTQMct8q0fvH2SSMsZBRdhDieX9Rv +cWaJUiX+VGQfEGDZQ3Qh+lLfK1PZ/bbnmirqwlXM7TcewjP9A1/RR086iG12uCbG05d aH+6XCCyHnxjt1hPDxQ0eYcIFcz2fzhTgpmg5BbvElzl4x2VlSp3srhj2vJHsNntNaCZ bMVw== 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=YQB3i+gSmXbmYMzEXUrNqnv/Nb9VzuZ1ZfDmoAznhmk=; b=jeHa2KcJRmFTnPVFfMSMjMq5y5WzMU3I1iildXSXCtCQXKjE8n/2ebD+oDGBJYs6PQ tsTqh5xbmOJvQWYCokYvLQU/Lud6tUetG30Z/CiaPPTZLbDI0OmFpnly9nwT9Nfn+pBn mjIKFO0X5ryWSvkNZ1w/0dF350zCoIGEYX7/rGlSyvZnMwqWdiHMBXgOhq6CA+HLevb3 +1edkCDjBcUVGWdrihDxMcTNZ/0KvbnrEiayBbNNjrxa8dqel7caICSynMCER2L3rUsT 7ocNwmnM5XzN4Wq1/XVAYovAZAYnyeZzInpKjrT517T5LziMWroUfmy7aeRnyn/hrj2R zurg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XhFFlmn7; 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 fk11-20020a05600c0ccb00b003e2066307d1si683814wmb.69.2023.03.09.12.22.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Mar 2023 12:22:36 -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=XhFFlmn7; 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 1paMay-0007A6-NX; Thu, 09 Mar 2023 15:10:36 -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 1paMaN-0005IS-7M for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:09:59 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paMaL-0001dC-NA for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:09:58 -0500 Received: by mail-pl1-x62b.google.com with SMTP id y11so3241979plg.1 for ; Thu, 09 Mar 2023 12:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678392596; 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=YQB3i+gSmXbmYMzEXUrNqnv/Nb9VzuZ1ZfDmoAznhmk=; b=XhFFlmn7jkxXXLt5FCbS82+qKPvxXZ1kjrZEowgHNYyDr0Fm8MQnr8P+FpNv3BD8vx oj22gBm60FlyvxNAfQyvwdT4hhvoZxmjgHw5K16hmEshBt0g9tj9l9i+YLwK0tLNTvHE EPs/w/2ikgocEa+iy+O2smppbYYjl0wE6L5zUf0WkfJ6HVeI4cbIdUz5wbxsQA/93J8O pubtp1MwwbOvWNtVhssdFk8dW0h00x95Hx01oRiTGYH7cv/3Z8zzG4x3M5pQLilqFXjX lcDkiaSzQ0kNL037BfsC8PCWj1aDrKhXlHdVfD8mGIHfDzERzD5RnGJ6kV7ihaTiEAe4 xgig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678392596; 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=YQB3i+gSmXbmYMzEXUrNqnv/Nb9VzuZ1ZfDmoAznhmk=; b=XqKKp8KBAaZwgf5qddBIkjIa9gB944nf8j/j33JE2yCIh3EKK0k+V+PCHLZuW1C1Z7 bzNWljhS4mcGmPUEHK2xpP7h69kypJjZXAfkAv8I3jGElp/ZnB9VqrCKc7pyjkPFggTf oIf2OBy41Pz6sbdpwIRV/D8amCALDp/N54NwSMS6pO2/rCVc7oR7pdKyJbIjTMQ8K2/e UC8CQptQ5ZMoObOisaTUqVXC+JganaTNsNEqTfRzp1igrsqPhykVaacfD8bbjZV1jSyq 0ppCGScGHndUA8BAGF7YAKChGG9Szvv0rLwWMsb7ghXHzmmhm4froIyFv9gVx7+tgFYu Hrzw== X-Gm-Message-State: AO0yUKW3PoZmT5dKBv49Wtkp+G0NLHhHZdl8dSfdPiIhqB3kjAnvh3pB 86Iz+YRhWb9HUCqvgPO4mH/ODBo1KzSgrrNdsZg= X-Received: by 2002:a17:903:441:b0:19d:244:a3a4 with SMTP id iw1-20020a170903044100b0019d0244a3a4mr21135998plb.47.1678392596383; Thu, 09 Mar 2023 12:09:56 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:bf7f:79a0:a976:bdaf]) by smtp.gmail.com with ESMTPSA id c2-20020a170902aa4200b001991e4e0bdcsm43797plr.233.2023.03.09.12.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 12:09:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL v2 73/91] target/arm: Improve trans_BFCI Date: Thu, 9 Mar 2023 12:05:32 -0800 Message-Id: <20230309200550.3878088-74-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309200550.3878088-1-richard.henderson@linaro.org> References: <20230309200550.3878088-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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 | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index b70b628000..4451aea09c 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,13 @@ 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); return true; }