From patchwork Tue Nov 7 03:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 741841 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1421962wrr; Mon, 6 Nov 2023 19:15:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6TNp25mfjI+3uZZB6qD87Js4qo06GUSpHj4U3tFZFnXGdH9lMGPe7lVvdHL8a+uiN3hYn X-Received: by 2002:a05:622a:154:b0:417:b00f:9c8a with SMTP id v20-20020a05622a015400b00417b00f9c8amr38398625qtw.27.1699326912553; Mon, 06 Nov 2023 19:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699326912; cv=none; d=google.com; s=arc-20160816; b=egyY4ojFBs/9Vw5BIKLSc2scGQZsf5FeYf4O36C+qFg4DS2bCpmdeZxK82VH6KsojT p9jz4OBBys7rr/2PJjF9n4JpcADlrfBMegXiXKcqY4tUR7PJSWOZ6dwDv9GogoV/65BU XA87HusjD/PpMpXkxeoyC/rBB7f83mXJC3cvJs8uAx0HsqL4yQpbO5Droyf3UQ73OQ1k u1vWDkJtER6XArJGX9AW96bigSD9k6BrtwYbFu+DxFaJauEQcOQZLFDA0nkz7Y7NsAWB j+9VgTYa44f+MMySgvkBCpjEjb9m0v2U+2dMRQgjVTyzQ/Qhcd56ZNm4zivdJ8kjJzTK 4tJA== 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=we3IFCWv2xg8MNB7vl19STMFoB0LdqgzaOSIdpBMD+0=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=Nm40G6lLin1K59xTTKaumbrfGLsnHi3dYS6bC+s/w6/H374Q82bB1+TJX8bmRe1p4J 1M2Ky2MawTtvnm3AgeAZjnD/VYFor1tZJ/X67z5SEXpzEcRFm5Vr3XKMUDeMuCZe1HU3 +D1gIH4hZgUg8fqfvmVFtYImVwmw/B0KEXmjpHQKbbyw2GyJpUUSgj0M+ynCrdneP/x8 BoMH31q6WtG78kM3zcOXG6jR2NxREooL7LIrKsTIiZvkx5i/AA4VG4NUTwaKGKRkWvGR w9TcYZWrseq0YX4ttRMrc9xpHg97PSKy22wMPBDrTyCGs/fKmaOBaRGHYxxcwGRDaYze w5FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nJcjl7BH; 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 ef6-20020a05622a53c600b0041eae066be5si4112129qtb.338.2023.11.06.19.15.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 19:15:12 -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=nJcjl7BH; 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-000413-75; 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 1r0CRL-0003xE-4K for qemu-devel@nongnu.org; Mon, 06 Nov 2023 22:07:43 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0CRJ-0001MN-6E for qemu-devel@nongnu.org; Mon, 06 Nov 2023 22:07:42 -0500 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5b980391d70so3939711a12.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=1699326460; x=1699931260; 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=we3IFCWv2xg8MNB7vl19STMFoB0LdqgzaOSIdpBMD+0=; b=nJcjl7BHVUOoob6WcB4fmBWpDrCkylsJ4t9IxkuD+l/OoFh631kSoQaiXPLuI8MQpP dQq3RmPiuo0ZAgzwY2ZPxQL12AaiRWQLcC64pmQnnvXPp2RLDDyTSYqbxt2mtCcTgmae l5K5fuss9rO0mDbMZ7FxtV8dLBX/SQkC7woayPbBlO1a0mFcmE8gfVE4/5RIz9l62CAy 8oPvh6i/q7JNSMHm14pBL7GhwDQH3XiYek3XNA4HD4TerwzuON6DOC3TKAscYc1+HtQq c3RHpXsA+mPr6ShmxmegnpXEdZpmMgmeWMXF+BXO5ed2Nmv8zvsmLSSwSugahSrXzq8j lX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699326460; x=1699931260; 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=we3IFCWv2xg8MNB7vl19STMFoB0LdqgzaOSIdpBMD+0=; b=U444nmdSCC7MSEzqxKPIBmxh7wOs6cFGM3ih+yCsc19g6vcXveCn0GTZWZa5tN93Tm V4ulyKG1zaBNsz04uBaWfGgS/e4jA8ddceHvqs3yeilgcsTT4zJiadKCIpfbyaQopWky p18dWfHc67pcx3MHlHCRMBy3Iqt7wP3Ewy+oNM0WdnoaFE5CPlgtCWwccx28t7BbichC lbHq4AyrbeFSC6I2Fcjxst6/nxihWVuzfprAHkZfhSB5URV4iKsb1PuwMdwpHvVleGhB ZseXLSmQGQsZgB5xwhaObu3gmBYa/OcCcNBCIm7C6BE7nrEocgN7HYzt9ncr7Z0MP9l5 P48Q== X-Gm-Message-State: AOJu0YxgyUNTaus65pnGieKe99dhqAIgHieeXaIvYH0g9K0Nc3UtJ7pu mKvuAyDmlMfbGAyCHeDW+NM0GyA4fVf4ZFYR00A= X-Received: by 2002:a05:6a20:914a:b0:17e:87c1:7971 with SMTP id x10-20020a056a20914a00b0017e87c17971mr39916727pzc.46.1699326459755; 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.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 19:07:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 42/85] target/hppa: Decode d for sub instructions Date: Mon, 6 Nov 2023 19:03:24 -0800 Message-Id: <20231107030407.8979-43-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::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.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 | 12 ++++++------ target/hppa/translate.c | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index 0f29869949..ad454adcbb 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -172,12 +172,12 @@ 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 -sub_tc 000010 ..... ..... .... 010011 0 ..... @rrr_cf -sub_tsv_tc 000010 ..... ..... .... 110011 0 ..... @rrr_cf -sub_b 000010 ..... ..... .... 010100 0 ..... @rrr_cf -sub_b_tsv 000010 ..... ..... .... 110100 0 ..... @rrr_cf +sub 000010 ..... ..... .... 010000 . ..... @rrr_cf_d +sub_tsv 000010 ..... ..... .... 110000 . ..... @rrr_cf_d +sub_tc 000010 ..... ..... .... 010011 . ..... @rrr_cf_d +sub_tsv_tc 000010 ..... ..... .... 110011 . ..... @rrr_cf_d +sub_b 000010 ..... ..... .... 010100 . ..... @rrr_cf_d +sub_b_tsv 000010 ..... ..... .... 110100 . ..... @rrr_cf_d ldil 001000 t:5 ..................... i=%assemble_21 addil 001010 r:5 ..................... i=%assemble_21 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 2f5cc597ad..f2b2933c88 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -1287,12 +1287,11 @@ static bool do_add_imm(DisasContext *ctx, arg_rri_cf *a, static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1, TCGv_reg in2, bool is_tsv, bool is_b, - bool is_tc, unsigned cf) + bool is_tc, unsigned cf, bool d) { TCGv_reg dest, sv, cb, cb_msb, zero, tmp; unsigned c = cf >> 1; DisasCond cond; - bool d = false; dest = tcg_temp_new(); cb = tcg_temp_new(); @@ -1350,7 +1349,7 @@ static void do_sub(DisasContext *ctx, unsigned rt, TCGv_reg in1, ctx->null_cond = cond; } -static bool do_sub_reg(DisasContext *ctx, arg_rrr_cf *a, +static bool do_sub_reg(DisasContext *ctx, arg_rrr_cf_d *a, bool is_tsv, bool is_b, bool is_tc) { TCGv_reg tcg_r1, tcg_r2; @@ -1360,7 +1359,7 @@ static bool do_sub_reg(DisasContext *ctx, arg_rrr_cf *a, } tcg_r1 = load_gpr(ctx, a->r1); tcg_r2 = load_gpr(ctx, a->r2); - do_sub(ctx, a->t, tcg_r1, tcg_r2, is_tsv, is_b, is_tc, a->cf); + do_sub(ctx, a->t, tcg_r1, tcg_r2, is_tsv, is_b, is_tc, a->cf, a->d); return nullify_end(ctx); } @@ -1373,7 +1372,8 @@ static bool do_sub_imm(DisasContext *ctx, arg_rri_cf *a, bool is_tsv) } tcg_im = tcg_constant_reg(a->i); tcg_r2 = load_gpr(ctx, a->r); - do_sub(ctx, a->t, tcg_im, tcg_r2, is_tsv, 0, 0, a->cf); + /* All SUBI conditions are 32-bit. */ + do_sub(ctx, a->t, tcg_im, tcg_r2, is_tsv, 0, 0, a->cf, false); return nullify_end(ctx); } @@ -2661,32 +2661,32 @@ static bool trans_add_c_tsv(DisasContext *ctx, arg_rrr_cf_d_sh *a) return do_add_reg(ctx, a, false, true, false, true); } -static bool trans_sub(DisasContext *ctx, arg_rrr_cf *a) +static bool trans_sub(DisasContext *ctx, arg_rrr_cf_d *a) { return do_sub_reg(ctx, a, false, false, false); } -static bool trans_sub_tsv(DisasContext *ctx, arg_rrr_cf *a) +static bool trans_sub_tsv(DisasContext *ctx, arg_rrr_cf_d *a) { return do_sub_reg(ctx, a, true, false, false); } -static bool trans_sub_tc(DisasContext *ctx, arg_rrr_cf *a) +static bool trans_sub_tc(DisasContext *ctx, arg_rrr_cf_d *a) { return do_sub_reg(ctx, a, false, false, true); } -static bool trans_sub_tsv_tc(DisasContext *ctx, arg_rrr_cf *a) +static bool trans_sub_tsv_tc(DisasContext *ctx, arg_rrr_cf_d *a) { return do_sub_reg(ctx, a, true, false, true); } -static bool trans_sub_b(DisasContext *ctx, arg_rrr_cf *a) +static bool trans_sub_b(DisasContext *ctx, arg_rrr_cf_d *a) { return do_sub_reg(ctx, a, false, true, false); } -static bool trans_sub_b_tsv(DisasContext *ctx, arg_rrr_cf *a) +static bool trans_sub_b_tsv(DisasContext *ctx, arg_rrr_cf_d *a) { return do_sub_reg(ctx, a, true, true, false); }