From patchwork Fri Oct 20 20:43:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 736298 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp501428wrl; Fri, 20 Oct 2023 13:46:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2n+rZX7PJ6r5wVydjdlYoHqxtR449e118bXLgU0mICoU4026WqF9jJlmNFrzUo+NYzLis X-Received: by 2002:ac8:5ad2:0:b0:419:9975:8096 with SMTP id d18-20020ac85ad2000000b0041999758096mr3920746qtd.49.1697834783205; Fri, 20 Oct 2023 13:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697834783; cv=none; d=google.com; s=arc-20160816; b=ioe0m+v1+m4HRAB/u/xOgJx5HgPx/boYWsvdkMFIcP9G/LQz3dhiPq9PPXUs3IOrJW OQL2c6KElSFQhQKerCHs1rGi+eZlB7haQQHDh5mImTw5isFrP/Dhg/IiRNPcXxX+tg43 X0hsPgz3pKnqcP7spNmZ0jONRnoA67ktrLMVRtJaj5cUcPnxISTImFyHthPo7UmG4YzV Ec6UE8cx/AgneyJTaVGIPEex/UnWCgZnS+oDi8S7loiwaHCO1LYHz6ieReY5JfCcxJit +MR2XAhv035mCDvO1jwD2pbtzr623rdLhbOWKlP1ucZWamae9bS6zpKNI1mwI80tmKEH ZE0A== 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=cvByl24MJI51YSIY+m9lpJLCF2jw0swZvW6LzKcbRvs=; fh=f2WZoDMBYjCKWIIOoPI+rQtxlv4fmOm4u+dLdQLqpOk=; b=dzjytgnQKwfgF6D5aFsSwLMX/SR5mGQBpeSQPL9yQMe+pRAoTgLqVzFxXNK1LLFP8W qURItZAjQsIVGZWQvgykD5HrNLMbheY4c4myrLAeX6Gt1YguOIxe/lPhnm8qgT9jvspc 0wxWk7PjUgtXVTC+idruHbStEzAun+zFBtuiQBAvtwlUFwxLDNbL7T70OTH881Xx7aCk fipjVZN1i5rm7fjKmWWKW8Veu/zC3xNLfSvtOpn++waczG9eUAe9MB82v57nNgTMq40t pL9heg540O60JTKK7egTqVcIGecGdOcWJuoKwmYGbQgApBlCv/vZBQg5aUeoPW7LBzSX koGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PJOyGoQg; 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 h8-20020ac85848000000b0041811753adbsi1945628qth.342.2023.10.20.13.46.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 13:46:23 -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=PJOyGoQg; 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 1qtwM3-0007yM-3K; Fri, 20 Oct 2023 16:44:23 -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 1qtwLo-0007mG-4O for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:44:09 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtwLm-0008GK-23 for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:44:07 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6b201a93c9cso1115421b3a.0 for ; Fri, 20 Oct 2023 13:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697834644; x=1698439444; 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=cvByl24MJI51YSIY+m9lpJLCF2jw0swZvW6LzKcbRvs=; b=PJOyGoQg9v1GTcdg20QkrBUd9+Myezkva+gQbJPi4ybeMfpcL/aIUySjSFa4a7pmQb TYk+itaCO6Ttuz9MTSqF9MkzcB4dLBKZq3W6N9P1wIWVUzmOTOdBhA2NFfpAjbMdYsR8 3x4jJvHhNk0iPo52hR2DWz/i8zfNHiyHTNN2381uDVY0ZMB16eL1og0b9tsL7HxmlR0h 65LlDw83Ifm9B60AKVH8OB7bX2WX4g6yahfRFy+r4U01IRHcDQe2e4VzdJ0ayqEMMQUj HAKjVInuFAT6PDp02knnw4Npv6fSVeBI9/KYv388JGDZ0Fc+uLCWoVzrL05i+YFrIzQC qSOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697834644; x=1698439444; 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=cvByl24MJI51YSIY+m9lpJLCF2jw0swZvW6LzKcbRvs=; b=rZjwTs+xHNz6fBvEzJPsycMZJyuCDhbn59PzcVc6YRpXnD5fx4GSFRvaiG4S9l/3kB hf1DLka2yAeV8dFqwKEDVWCNJdTlFXPaWvCwe+TZUHpLOmHrMpHAkIF3hrsxUEOzWz/c 7W6L7p+/jPoqqEbGNvgufYOzKqy5hQk4rTlv22uqgS8+VmgcBWg66qQ0MIO6+xvUMOsZ LlnCPhDTu4QBeckTrPC5+/bZcfr8aCJesq3xkgqACoYNH9q1SJmevjBkn6Aee0/Lvinh XpaP3aeMetB5PVN2Ch2oT8+83aBzUfM/V7fjWlh+WclTGm2uK3HucN1Cm9bhtnRNdCYb gMoQ== X-Gm-Message-State: AOJu0YxZMQHk3dpEOQLt75WDAglKgnabhMTcxuVHNxIGqQwit24nnvPN 2nTocYYu5Q/XaaKUAqlffobKoqbn8Oon3gV31yY= X-Received: by 2002:a05:6a20:8f01:b0:15e:2d9f:cae0 with SMTP id b1-20020a056a208f0100b0015e2d9fcae0mr3309955pzk.10.1697834644636; Fri, 20 Oct 2023 13:44:04 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id k15-20020aa7998f000000b00688965c5227sm1944975pfh.120.2023.10.20.13.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:44:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v2 35/65] target/hppa: Decode d for bb instructions Date: Fri, 20 Oct 2023 13:43:01 -0700 Message-Id: <20231020204331.139847-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020204331.139847-1-richard.henderson@linaro.org> References: <20231020204331.139847-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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 Manipulate the shift count so that the bit to be tested is always placed at the MSB. Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 4 ++-- target/hppa/translate.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index ad454adcbb..b185523021 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -290,8 +290,8 @@ fmpysub_d 100110 ..... ..... ..... ..... 1 ..... @mpyadd # Conditional Branches #### -bb_sar 110000 00000 r:5 c:1 10 ........... n:1 . disp=%assemble_12 -bb_imm 110001 p:5 r:5 c:1 10 ........... n:1 . disp=%assemble_12 +bb_sar 110000 00000 r:5 c:1 1 d:1 ........... n:1 . disp=%assemble_12 +bb_imm 110001 p:5 r:5 c:1 1 d:1 ........... n:1 . disp=%assemble_12 movb 110010 ..... ..... ... ........... . . @rrb_cf f=0 movbi 110011 ..... ..... ... ........... . . @rib_cf f=0 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index df5a6dc896..543a694724 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3151,13 +3151,12 @@ static bool trans_bb_sar(DisasContext *ctx, arg_bb_sar *a) { TCGv_reg tmp, tcg_r; DisasCond cond; - bool d = false; nullify_over(ctx); tmp = tcg_temp_new(); tcg_r = load_gpr(ctx, a->r); - if (cond_need_ext(ctx, d)) { + if (cond_need_ext(ctx, a->d)) { /* Force shift into [32,63] */ tcg_gen_ori_reg(tmp, cpu_sar, 32); tcg_gen_shl_reg(tmp, tcg_r, tmp); @@ -3173,14 +3172,13 @@ static bool trans_bb_imm(DisasContext *ctx, arg_bb_imm *a) { TCGv_reg tmp, tcg_r; DisasCond cond; - bool d = false; int p; nullify_over(ctx); tmp = tcg_temp_new(); tcg_r = load_gpr(ctx, a->r); - p = a->p | (cond_need_ext(ctx, d) ? 32 : 0); + p = a->p | (cond_need_ext(ctx, a->d) ? 32 : 0); tcg_gen_shli_reg(tmp, tcg_r, p); cond = cond_make_0(a->c ? TCG_COND_GE : TCG_COND_LT, tmp);