From nobody Wed Nov 27 21:35:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697666557; cv=none; d=zohomail.com; s=zohoarc; b=bRbRtbEtycxXTvTVCyDG9ho6ZGQN7V2DPDOS/KLr8rjUl0ywBaNujI7HohVFLgDFij8OQ0ko+tlSvxCjoEvKMZSBWGR8hagQxlspNuK7uW7nR4B51W8vwRuc8Rj30G95sGeNdpwarqmkM0LuCEbqZnk8JjXrfgxKbpk9tYkwzLo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697666557; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7iHWuCbXcxtsog6Wn/6KwP1Awc1ANERXzKnjfdaTViQ=; b=EGZVa10647IzHELSTQqIAdoW/jKnAFZClhWAWcfzFinbGUvKYKQrn7pkrTZLLlrk4g2De9O3xJJ61BzD+ToJLGTX5v9hBZE9hBaAlRU9cknARadDt2GapUhSC1MTk9ffgNg8UYmHS0Bqi4IoW7/ZuMMe8tGGnvFENCyAGfILsNo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169766655742365.61074789459997; Wed, 18 Oct 2023 15:02:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtEVm-0002Gq-5X; Wed, 18 Oct 2023 17:55:30 -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 1qtEVk-0002G3-T4 for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:55:28 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtEVj-00057s-BA for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:55:28 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6b44befac59so125255b3a.0 for ; Wed, 18 Oct 2023 14:55:26 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id r15-20020aa7962f000000b006889348ba6esm3796263pfg.127.2023.10.18.14.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 14:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697666126; x=1698270926; 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=7iHWuCbXcxtsog6Wn/6KwP1Awc1ANERXzKnjfdaTViQ=; b=DR1k9OB+d+8E9zg50Iwdtk0DA1ENq28y5Dggn0JsULl2wrlVan86cJTxudcEBHwPvL 5e2ziTLZZ8FVzMJ6OZmd98XREArLcbKOsUufNwgPqYlWuml6JWi7wGGAzAedbgiJhESQ 7JLzsgYzeI4yqJa2uJOkDib2JLkTda+8yDnmUv/xRvb/DPCRg+w+WjMPbpRXf1EeOF/Z CxYPb+cYhna704b+87PjFihVKj+dAqXvT4NUorbW0DDdQWkATL2AyM4H6Q6bmEh3Vd6A T8EJ5oLQqcSoVsUwc0oEBdVTA9rn9UI3JSn1Tb919raHSt7vFPCGU9TkqK2BqIrYoZx0 rcDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697666126; x=1698270926; 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=7iHWuCbXcxtsog6Wn/6KwP1Awc1ANERXzKnjfdaTViQ=; b=ZqH3n5XMinIEiBhpalsRlb1CdN4DiOGOiBoxSpR/JLYou5iygDjOjWWo8rdzqlKTUp agvGesWBDAYOX5SDYq2vnSlEcinLytxa8rw5RY7+pyBzQJmpjooEzoGKIt+njzsOfOZu nC9VzJcLvhQvT4jFtpwSiy103rkb9jatj94aiHi3C7mnmprkVhJe3voh8pHFdZyhtvgA ithnaJfVv68SnDzSlthsPDBhN7d2+oksJYGyrOSPG9Z50MSFsBXwcd7hphwADXT7GXYz 25LY1SZM2jMhwxsZBoTztICawrw4STuUshDTTS9Pe9AzexfwQ2ShAFIFySRZDxRZ2dV7 iYuQ== X-Gm-Message-State: AOJu0YzQnVmFVndJgY4Wh/+5WJO+3XaWPezazdNOE4UuS2cgCwnomVMu NCSh5D5sZGD43E8mu65P/r7Iz3fNOhCZfQBqJ20= X-Google-Smtp-Source: AGHT+IFLnxLa8rFwoum5nz0N7XXrDxCjhaGLJsdIwr5GwyDdmtwyZvHg6XXnfjGq1LcWKcPyObUs0A== X-Received: by 2002:a05:6a20:4424:b0:13a:dd47:c31a with SMTP id ce36-20020a056a20442400b0013add47c31amr132734pzb.20.1697666126014; Wed, 18 Oct 2023 14:55:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH 57/61] target/hppa: Implement PERMH Date: Wed, 18 Oct 2023 14:51:31 -0700 Message-Id: <20231018215135.1561375-58-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018215135.1561375-1-richard.henderson@linaro.org> References: <20231018215135.1561375-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697666558910100007 Content-Type: text/plain; charset="utf-8" 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 323e9275bf..c8f4317576 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 =20 +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 bd8a858da6..40b5a3d8c3 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2918,6 +2918,35 @@ static bool trans_mixw_r(DisasContext *ctx, arg_rrr = *a) return do_multimedia(ctx, a, gen_mixw_r); } =20 +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 =3D load_gpr(ctx, a->r1); + t0 =3D tcg_temp_new_i64(); + t1 =3D tcg_temp_new_i64(); + t2 =3D tcg_temp_new_i64(); + t3 =3D 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) { --=20 2.34.1