From patchwork Thu Nov 2 01:29:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 740400 Delivered-To: patch@linaro.org Received: by 2002:a5d:538f:0:b0:32d:baff:b0ca with SMTP id d15csp596357wrv; Wed, 1 Nov 2023 18:42:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIhd4M6yYm6vwXchoXrHCFNLmh1aGn/jwr2boxZumZD2XSxfoP07bTKH3uHok3ITF+2klk X-Received: by 2002:a05:620a:2b4b:b0:776:5135:d96d with SMTP id dp11-20020a05620a2b4b00b007765135d96dmr16918075qkb.69.1698889356157; Wed, 01 Nov 2023 18:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698889356; cv=none; d=google.com; s=arc-20160816; b=UVyqKysLcZNHhWTCizygFsDDmYGEPuMoTqprKEiCO4ClxfYGH9Qh/fIg5A1KTgzX3q 6iGorzJHe+IwUGk9Ms+Yp/dxtaCWt9PNPFp2Ekx6gNOjPp/SdiiUwYjQLkIXkQ2y47Q/ ZeVl0FrUUl7aFqNlGrxw586VYxRXunjdPsvIvJ2rtPO3YRyKDujOGWc481paYCqqil0q 0cEnLwbZtoGkn8Gdf75Ar+HcqRaCyE2GT5yKiggiGwuJrJ+kzvJlq+LGGtqknZnEtLBA j+GtUqc04YZBAFvyjLxD/SAAMDcpAcU/E9XNg1RoeKBEeR7IEUgI8w8T0c7j2S4eL0Qy Ap3w== 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=dkyljCZpqzWzIh5N8Q5xG0nF40yxIPLXLpPcj7wj9PI=; fh=f2WZoDMBYjCKWIIOoPI+rQtxlv4fmOm4u+dLdQLqpOk=; b=L/IuHTCPLQ05PLIQQqNRscoeYiyqpDAVhaLsALi5UtihKz3Dt9C2Hi192nEDhTrlTp ZdOXfYtGlk+CWmUFNqF+o9jw9fZwoWVik1EUAFBLnV6Ib+fetdUzhEB34/no/P6hnIi1 s5ewwVntu7PBJoXsgDIf/iPQFnei8iGvnusViCclixnvGYQecbnjo4tisBz2C619XdAr vhaPwgAXAP+b+Y25dH3jlyJD5TFNQhjWYCO+GspNrUmkVieTRI8tvcS3bBGo8TFkPajw 1CmQX8jAFhSu+mo9Rg3CA9vYCF0+ISAdwwP3vOk5wbSd4zA8EZhUSzAp3Cpuf1J+L99s modA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qXjXhsdG; 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 x11-20020a05620a448b00b0077a50b1431dsi1848721qkp.221.2023.11.01.18.42.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Nov 2023 18:42:36 -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=qXjXhsdG; 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 1qyMbP-0006g2-0j; Wed, 01 Nov 2023 21:34:32 -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 1qyMbE-0006br-LK for qemu-devel@nongnu.org; Wed, 01 Nov 2023 21:34:22 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyMbC-00025H-87 for qemu-devel@nongnu.org; Wed, 01 Nov 2023 21:34:20 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-5b8c39a2dceso292149a12.2 for ; Wed, 01 Nov 2023 18:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698888857; x=1699493657; 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=dkyljCZpqzWzIh5N8Q5xG0nF40yxIPLXLpPcj7wj9PI=; b=qXjXhsdGFvQ/sM1V69tlwpAWY6CkRTB4YQTMArYz/1dRLijgjm8AdkPL2wrTXS66Pt 5ojtPYcNp+uaIijBTo7GVlM7L++iL5HfnOywGQ1B3iPRJTC2N5htDjRVeeajrXrNgZC2 vmTRAVd74FQHBiWDdZbtF9yiVK2B79TS9YcVRb+UOO60JCbAHaG6mK+/lUKKqCYYtFzB gJQuO64+CnNalwMBPbII8DoG5DiTH3d9OO2Ho0nJ8yPzphub0mlOUJqPBToFC773LZYp b2ZMGXKz1y8qw+Jk7xfbpuflkCLEMCW+zvnYixU9JvkcuipktCdonUJWof+PnLcGqXgj YIZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698888857; x=1699493657; 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=dkyljCZpqzWzIh5N8Q5xG0nF40yxIPLXLpPcj7wj9PI=; b=g6HmzOZumAFP4sT3a8kYgRKFZ3PCs54hL2/Wfqzppd/iX/Os/mMxw+DtA0BgsbZkhU xGq+GWc5al1oa1xKfhAKO9L+jl9z9sgs57pEpKckQ9T+E11VaYiNHOQBurXlGbrr4D1q NbtHp4YOo7yhT1HEWVutQmHDMT3CGdXww9ALZhIxYw85uIFdepby2gsw2ePyI0ZDMyju Z1UnrH5hVN57nleoBINSCYbfPr1k+LATF/xuHOvIMWwBW35vA4r+5u+c/JHkBDYd8C+r q1u9V7UswHShX7/KTD935o7uHnT7naMT8+d62hNoVV93BsoKyctvlZD8JGH4kXgvqjxR 4flg== X-Gm-Message-State: AOJu0YyPHyJzgwG0CMYaAQfRUaVX6xjVEsAM7UMjEUmo8GUuSLKBOfKP sj+bWb7jwdrkqVgQecwISkUAxGB9IC8/FMwIi9w= X-Received: by 2002:a17:903:2306:b0:1cc:3fc9:1802 with SMTP id d6-20020a170903230600b001cc3fc91802mr11885379plh.61.1698888856753; Wed, 01 Nov 2023 18:34:16 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id t2-20020a1709027fc200b001a98f844e60sm1918125plb.263.2023.11.01.18.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 18:34:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 69/88] target/hppa: Implement PERMH Date: Wed, 1 Nov 2023 18:29:57 -0700 Message-Id: <20231102013016.369010-70-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231102013016.369010-1-richard.henderson@linaro.org> References: <20231102013016.369010-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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 | 2 ++ target/hppa/translate.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index 22ec07f892..19e537df24 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -238,6 +238,8 @@ mixh_r 111110 ..... ..... 1 10 00100000 ..... @rrr mixw_l 111110 ..... ..... 1 00 00000000 ..... @rrr mixw_r 111110 ..... ..... 1 10 00000000 ..... @rrr +permh 111110 r1:5 r2:5 0 c0:2 0 c1:2 c2:2 c3:2 0 t:5 + #### # Index Mem #### diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 47ca71e2a3..36653486fb 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2946,6 +2946,35 @@ static bool trans_mixw_r(DisasContext *ctx, arg_rrr *a) return do_multimedia(ctx, a, gen_mixw_r); } +static bool trans_permh(DisasContext *ctx, arg_permh *a) +{ + TCGv_i64 r, t0, t1, t2, t3; + + if (!ctx->is_pa20) { + return false; + } + + nullify_over(ctx); + + r = load_gpr(ctx, a->r1); + t0 = tcg_temp_new_i64(); + t1 = tcg_temp_new_i64(); + t2 = tcg_temp_new_i64(); + t3 = tcg_temp_new_i64(); + + tcg_gen_extract_i64(t0, r, (3 - a->c0) * 16, 16); + tcg_gen_extract_i64(t1, r, (3 - a->c1) * 16, 16); + tcg_gen_extract_i64(t2, r, (3 - a->c2) * 16, 16); + tcg_gen_extract_i64(t3, r, (3 - a->c3) * 16, 16); + + tcg_gen_deposit_i64(t0, t1, t0, 16, 48); + tcg_gen_deposit_i64(t2, t3, t2, 16, 48); + tcg_gen_deposit_i64(t0, t2, t0, 32, 32); + + save_gpr(ctx, a->t, t0); + return nullify_end(ctx); +} + static bool trans_ld(DisasContext *ctx, arg_ldst *a) { if (!ctx->is_pa20 && a->size > MO_32) {