From patchwork Tue Nov 7 03:03:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741844 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1422071wrr; Mon, 6 Nov 2023 19:15:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IG492UQ3B2Bps/H5nAagPGzPMjO7gYRoDc9XkApGsWy4Ph0V/h36tpISCRQ73bXbCUQH9Go X-Received: by 2002:a05:620a:890c:b0:77a:29a:2758 with SMTP id ql12-20020a05620a890c00b0077a029a2758mr32422282qkn.73.1699326933988; Mon, 06 Nov 2023 19:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699326933; cv=none; d=google.com; s=arc-20160816; b=Rbcsi0TfatlrhUo1J8IN3RDh71K80BXwuqtNOC2bNA+h4HWPp9+m6duI1tqUlDKJII FMBv/UXHqxIrvRUmpeCngxhwv4d1LrmKnw/7ywottYI8r+l/ktj0X1mBIuczKqsO1Elt iAyJ2LkrhV4Q1X2mI3W4xNhh2jtqEqrC2g8flPuB6PYswltebOdE7BP64BPgVorYU6Sl kFklru16iTtmnU5eB8b3cekMdDifyP1Dx5xjM+eDK/H8IwllAuINWFVncmj2YE69zcVq iSY6SYlCPC6pQNz2GKG1lok8NtOAqafkj7KrQxvZw2pTfhhsw+SrRu+A3NBL9Oc4nsP0 Fuew== 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:to:from :dkim-signature; bh=yLd8W3zal3J+slwE0L+I0m/NAcKeikLDIlYBd/HWxR0=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=YxHRQDh6cVIhKZqu+esEY/Aa6Y+2c8tHCajRnM4MffGrDLFOU3Fnh+KnC62a7NtASw HHU+xSaiZFJ6OlcEut49J1Gi3LnKX8yRUxDi7kZzFe0HC2vXDW9Z02byncZj0Cr8yJ6N 4Rx4LsYuDeFpv42hRx1Re4YAI5rYHmosOS6ruiixQo/EeBGq3UkeYgbUu+RtaFqCZqhe DMNf3r5CyvTD1wchnuVo7uUZHNPbceC2BFNe9DOcs2WqDiGcx6ZcQIEdPGPQ/S7LOUT2 qI+kfqKyI30NpOewHcD9tRI1yqsvkV2UGqaM1GS+9TjxTeyLVxJLFFgqrugWn0Zj+osQ bK2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o0qPlQ/s"; 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 i9-20020a05620a27c900b0076cadd6f855si6811458qkp.219.2023.11.06.19.15.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 19:15:33 -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="o0qPlQ/s"; 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 1r0CRN-000429-QS; Mon, 06 Nov 2023 22:07:45 -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 1r0CRK-0003vc-Lr for qemu-devel@nongnu.org; Mon, 06 Nov 2023 22:07:42 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0CRI-0001MK-HT for qemu-devel@nongnu.org; Mon, 06 Nov 2023 22:07:42 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1cc3bb4c307so42487565ad.0 for ; Mon, 06 Nov 2023 19:07:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699326459; x=1699931259; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yLd8W3zal3J+slwE0L+I0m/NAcKeikLDIlYBd/HWxR0=; b=o0qPlQ/snkeHM5+A1Bh6QN2sjhjudxMfcB2CBoryOy2pyekt1VyDByvhyigGYRREJF nDJd+SI6G3LcE62yH78vjJ2zpeE7njB0FllXay2HoLgMiG43hGsireJuAOmvsGQf8dFP xwlmCs7W2Sm6FLk/MTtYVQYvWBEQ9Vz3Cb/P21Flxzm9E3pEsIFqACucmNrrIWRVAoaC zrQZCf8eBsFZKRMgR4B4FvN6qC41ZNRuGhKfLuCPve/ojEayZWI0PtX1+oeiBEZ5XRUX 5V4PWXo0QtYEIgTJxfidwF1ZbAgB8g7XqvktnLrsLVvBSQF/Yq/rS0JCNnsuCgzQhclo PjLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699326459; x=1699931259; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yLd8W3zal3J+slwE0L+I0m/NAcKeikLDIlYBd/HWxR0=; b=ZDTx5sxWIweQ4UBAh1HbeGtz+EWPK97v/EEDXBH7Mq8KXrueB5M1zB9/aFEB+U4ZDQ 8X659XX9t+3WtrzAfxec61nqMB6Xmo3PC80Phjb27lA2oGl+oUuJTQ1ofGk/zyahJQGw d7Adi/iHrI58BgbZu62Ty53I/LLPnGAUVTKVuh7fUde173tqtTBmrWd2KuJz4iYiJg4B /a6KomeVnZlkgLpKeJrfoEwGB0vYLweqDyI1YTUyOtKqF+moXcy2xo0Re6MDYGAk2GKv WNzVv1+nblQzMJTHNPmuYodUpaKu1P7AAebRDJV94RE3QlGyrAAGlGvw64MC2l8BJJUY Fc1A== X-Gm-Message-State: AOJu0Yw/3U1dM9UFovhpbor7KveXhuzilYL0UC1x5rhscS2wNiWVg2eX rNV7/7NqCzpb+OO0j9/TiHrRmNi7ni0lRjl3qKI= X-Received: by 2002:a17:90b:4a84:b0:280:6b5b:3f40 with SMTP id lp4-20020a17090b4a8400b002806b5b3f40mr20356149pjb.8.1699326459093; Mon, 06 Nov 2023 19:07:39 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 13-20020a17090a004d00b0027782f611d1sm6744883pjb.36.2023.11.06.19.07.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 19:07:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 41/85] target/hppa: Decode d for add instructions Date: Mon, 6 Nov 2023 19:03:23 -0800 Message-Id: <20231107030407.8979-42-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231107030407.8979-1-richard.henderson@linaro.org> References: <20231107030407.8979-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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=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 Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 16 ++++++++-------- target/hppa/translate.c | 21 +++++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index d4a03b0299..0f29869949 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -62,7 +62,7 @@ &rr_cf_d t r cf d &rrr_cf t r1 r2 cf &rrr_cf_d t r1 r2 cf d -&rrr_cf_sh t r1 r2 cf sh +&rrr_cf_d_sh t r1 r2 cf d sh &rri_cf t r i cf &rri_cf_d t r i cf d @@ -76,8 +76,8 @@ @rr_cf_d ...... r:5 ..... cf:4 ...... d:1 t:5 &rr_cf_d @rrr_cf ...... r2:5 r1:5 cf:4 ....... t:5 &rrr_cf @rrr_cf_d ...... r2:5 r1:5 cf:4 ...... d:1 t:5 &rrr_cf_d -@rrr_cf_sh ...... r2:5 r1:5 cf:4 .... sh:2 . t:5 &rrr_cf_sh -@rrr_cf_sh0 ...... r2:5 r1:5 cf:4 ....... t:5 &rrr_cf_sh sh=0 +@rrr_cf_d_sh ...... r2:5 r1:5 cf:4 .... sh:2 d:1 t:5 &rrr_cf_d_sh +@rrr_cf_d_sh0 ...... r2:5 r1:5 cf:4 ...... d:1 t:5 &rrr_cf_d_sh sh=0 @rri_cf ...... r:5 t:5 cf:4 . ........... &rri_cf i=%lowsign_11 @rri_cf_d ...... r:5 t:5 cf:4 d:1 ........... &rri_cf_d i=%lowsign_11 @@ -166,11 +166,11 @@ uaddcm_tc 000010 ..... ..... .... 100111 . ..... @rrr_cf_d dcor 000010 ..... 00000 .... 101110 . ..... @rr_cf_d dcor_i 000010 ..... 00000 .... 101111 . ..... @rr_cf_d -add 000010 ..... ..... .... 0110.. - ..... @rrr_cf_sh -add_l 000010 ..... ..... .... 1010.. 0 ..... @rrr_cf_sh -add_tsv 000010 ..... ..... .... 1110.. 0 ..... @rrr_cf_sh -add_c 000010 ..... ..... .... 011100 0 ..... @rrr_cf_sh0 -add_c_tsv 000010 ..... ..... .... 111100 0 ..... @rrr_cf_sh0 +add 000010 ..... ..... .... 0110.. . ..... @rrr_cf_d_sh +add_l 000010 ..... ..... .... 1010.. . ..... @rrr_cf_d_sh +add_tsv 000010 ..... ..... .... 1110.. . ..... @rrr_cf_d_sh +add_c 000010 ..... ..... .... 011100 . ..... @rrr_cf_d_sh0 +add_c_tsv 000010 ..... ..... .... 111100 . ..... @rrr_cf_d_sh0 sub 000010 ..... ..... .... 010000 - ..... @rrr_cf sub_tsv 000010 ..... ..... .... 110000 0 ..... @rrr_cf diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8301d007ff..2f5cc597ad 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -1186,12 +1186,11 @@ static TCGv_reg do_sub_sv(DisasContext *ctx, TCGv_reg res, static void do_add(DisasContext *ctx, unsigned rt, TCGv_reg in1, TCGv_reg in2, unsigned shift, bool is_l, - bool is_tsv, bool is_tc, bool is_c, unsigned cf) + bool is_tsv, bool is_tc, bool is_c, unsigned cf, bool d) { TCGv_reg dest, cb, cb_msb, cb_cond, sv, tmp; unsigned c = cf >> 1; DisasCond cond; - bool d = false; dest = tcg_temp_new(); cb = NULL; @@ -1256,7 +1255,7 @@ static void do_add(DisasContext *ctx, unsigned rt, TCGv_reg in1, ctx->null_cond = cond; } -static bool do_add_reg(DisasContext *ctx, arg_rrr_cf_sh *a, +static bool do_add_reg(DisasContext *ctx, arg_rrr_cf_d_sh *a, bool is_l, bool is_tsv, bool is_tc, bool is_c) { TCGv_reg tcg_r1, tcg_r2; @@ -1266,7 +1265,8 @@ static bool do_add_reg(DisasContext *ctx, arg_rrr_cf_sh *a, } tcg_r1 = load_gpr(ctx, a->r1); tcg_r2 = load_gpr(ctx, a->r2); - do_add(ctx, a->t, tcg_r1, tcg_r2, a->sh, is_l, is_tsv, is_tc, is_c, a->cf); + do_add(ctx, a->t, tcg_r1, tcg_r2, a->sh, is_l, + is_tsv, is_tc, is_c, a->cf, a->d); return nullify_end(ctx); } @@ -1280,7 +1280,8 @@ static bool do_add_imm(DisasContext *ctx, arg_rri_cf *a, } tcg_im = tcg_constant_reg(a->i); tcg_r2 = load_gpr(ctx, a->r); - do_add(ctx, a->t, tcg_im, tcg_r2, 0, 0, is_tsv, is_tc, 0, a->cf); + /* All ADDI conditions are 32-bit. */ + do_add(ctx, a->t, tcg_im, tcg_r2, 0, 0, is_tsv, is_tc, 0, a->cf, false); return nullify_end(ctx); } @@ -2635,27 +2636,27 @@ static bool trans_lci(DisasContext *ctx, arg_lci *a) return true; } -static bool trans_add(DisasContext *ctx, arg_rrr_cf_sh *a) +static bool trans_add(DisasContext *ctx, arg_rrr_cf_d_sh *a) { return do_add_reg(ctx, a, false, false, false, false); } -static bool trans_add_l(DisasContext *ctx, arg_rrr_cf_sh *a) +static bool trans_add_l(DisasContext *ctx, arg_rrr_cf_d_sh *a) { return do_add_reg(ctx, a, true, false, false, false); } -static bool trans_add_tsv(DisasContext *ctx, arg_rrr_cf_sh *a) +static bool trans_add_tsv(DisasContext *ctx, arg_rrr_cf_d_sh *a) { return do_add_reg(ctx, a, false, true, false, false); } -static bool trans_add_c(DisasContext *ctx, arg_rrr_cf_sh *a) +static bool trans_add_c(DisasContext *ctx, arg_rrr_cf_d_sh *a) { return do_add_reg(ctx, a, false, false, false, true); } -static bool trans_add_c_tsv(DisasContext *ctx, arg_rrr_cf_sh *a) +static bool trans_add_c_tsv(DisasContext *ctx, arg_rrr_cf_d_sh *a) { return do_add_reg(ctx, a, false, true, false, true); }