From nobody Wed Nov 27 19:48:43 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=1697834800; cv=none; d=zohomail.com; s=zohoarc; b=GwjVvB3FmVQ0UIVFA1WZea0IScam9K7ZDLWxzrUHuHsXwcatMVU8g04HcLoGhJjKqFa7XN2LcPXMAKI2/buHZ40S+RzdyPmpPeUlspvfvHxUQ9fyZvxJVOAgA2v9QobtjK5+tO6RPLzelS2wnvTqvuRdv2d8L2U4RM4pmp7u/Qs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697834800; 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=9Y0TWqbSJ7897PJsLkdK8seC1JV+I54PI/WHM1mCLlw=; b=ivh+qvWN0doqRwebS1ivhLXUBfl88M99JTdaL9NYHyLZket9k0r34C0Fi59IEVHJiLKevzIjpE/fEQESxAbuTFHWR3bhACRRJVLGtO+6UXZFZen9rHOFrs559lDgf+9m+ZCaxv/tsLiaPf/MsMJcj9bCx914Bf1dwaAAeguxDC4= 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 1697834800335413.52204182015134; Fri, 20 Oct 2023 13:46:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtwM3-0007yQ-Kq; 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 1qtwLp-0007mM-IJ for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:44:09 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtwLn-0008Gr-Js for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:44:09 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6b7f0170d7bso1160115b3a.2 for ; Fri, 20 Oct 2023 13:44:07 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id k15-20020aa7998f000000b00688965c5227sm1944975pfh.120.2023.10.20.13.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); 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=1697834646; x=1698439446; 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=9Y0TWqbSJ7897PJsLkdK8seC1JV+I54PI/WHM1mCLlw=; b=I9rivRQQL2ByoK9jUSheD/9LkC29beFLKI9tAD3om2+tsEsGYeFVPl0biChVXo7Ov1 t7vmi/OjoZbbbPEuHcG1JJ4lO8EwAOj8BCofULZLYWUUJXVID1qeuXci1uor1fZPW3lp sFgw+wRzZ4FFWuXKpnhXEUyf3WUzGHaWEFuuXEajY5djdLDKsQCIhQ4Gb195CEdkfdSP C32X+Yvb+z3GLloge9xXrkFWXgEgiwDTcjSn0u1AgcMbd47fX7PKaE01EtM821LKBCm+ 0SAXBMOOFuoiXauKIUiEapgFoeYcDobP3kjLLPP3z2BgAGrwlzyWWsRw0aGLImm5xHfD NTfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697834646; x=1698439446; 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=9Y0TWqbSJ7897PJsLkdK8seC1JV+I54PI/WHM1mCLlw=; b=TSnuwwBF6fCNr3EDTB+5FaZ/pjSs4M7JqCY4cgT6W0ZpK2aQfKU2Z2k+gvFAtsmSFT gofWBrOEghyO8EDbqwjD/h5BTrwpg9NocPFIl0B5omIWfe2n6GDHzfy1rJ+/d4F7LaQT vNaRy+FNXhdw+AkaWau5wpVz4AjgMEsgoaZJ/q066M/TSM3PQfsscC3FSKRr29gjvf0l suqkX5mT0AlFQVThvUl8LhIp9Ejo7j59tju69bmZ72u658+PsVnqU5V8cXElEA/Ih12h t/t26iez0Tlk5hHedmuV91OQzNEJ6SG2HzueZrPvkNw4YYcPkVJK2bFJ+h1g1p5+fyW6 tw8g== X-Gm-Message-State: AOJu0YyWDMlMzuX45B8L7pKQX2OxWEh92ClroOllGny/zYjK0qDy1bok 5M7qaTVnJvsCa1IFuY0EI8dHaZNQ6i+WxqAnXeU= X-Google-Smtp-Source: AGHT+IF9By1g3a6FB66/xnrrHe+3cJ2sjd06X87HwtUtgZQYR1HK0+30urD9p6d6TrKj58Lje07Cxw== X-Received: by 2002:a05:6a00:812:b0:6b5:6c95:4671 with SMTP id m18-20020a056a00081200b006b56c954671mr3184314pfk.34.1697834646200; Fri, 20 Oct 2023 13:44:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v2 37/65] target/hppa: Decode CMPIB double-word Date: Fri, 20 Oct 2023 13:43:03 -0700 Message-Id: <20231020204331.139847-38-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 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::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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: 1697834802358100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 10 ++++++++-- target/hppa/translate.c | 11 ++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index fc327e2bb3..48f09c9b06 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -51,6 +51,7 @@ %pos_to_m 0:1 !function=3Dpos_to_m %neg_to_m 0:1 !function=3Dneg_to_m %a_to_m 2:1 !function=3Dneg_to_m +%cmpbid_c 13:2 !function=3Dcmpbid_c =20 #### # Argument set definitions @@ -69,6 +70,7 @@ &rrb_c_f disp n c f r1 r2 &rrb_c_d_f disp n c d f r1 r2 &rib_c_f disp n c f r i +&rib_c_d_f disp n c d f r i =20 #### # Format definitions @@ -88,6 +90,8 @@ &rrb_c_d_f disp=3D%assemble_12 @rib_cf ...... r:5 ..... c:3 ........... n:1 . \ &rib_c_f disp=3D%assemble_12 i=3D%im5_16 +@rib_cdf ...... r:5 ..... c:3 ........... n:1 . \ + &rib_c_d_f disp=3D%assemble_12 i=3D%im5_16 =20 #### # System @@ -303,8 +307,10 @@ cmpb 100000 ..... ..... ... ........... . .= @rrb_cdf d=3D0 f=3D0 cmpb 100010 ..... ..... ... ........... . . @rrb_cdf d=3D0 f= =3D1 cmpb 100111 ..... ..... ... ........... . . @rrb_cdf d=3D1 f= =3D0 cmpb 101111 ..... ..... ... ........... . . @rrb_cdf d=3D1 f= =3D1 -cmpbi 100001 ..... ..... ... ........... . . @rib_cf f=3D0 -cmpbi 100011 ..... ..... ... ........... . . @rib_cf f=3D1 +cmpbi 100001 ..... ..... ... ........... . . @rib_cdf d=3D0 f= =3D0 +cmpbi 100011 ..... ..... ... ........... . . @rib_cdf d=3D0 f= =3D1 +cmpbi 111011 r:5 ..... f:1 .. ........... n:1 . \ + &rib_c_d_f d=3D1 disp=3D%assemble_12 c=3D%cmpbid_c i=3D%im= 5_16 =20 addb 101000 ..... ..... ... ........... . . @rrb_cf f=3D0 addb 101010 ..... ..... ... ........... . . @rrb_cf f=3D1 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index d1d9a4a137..bb55718a4d 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -329,6 +329,12 @@ static int expand_shl11(DisasContext *ctx, int val) return val << 11; } =20 +/* Translate CMPI doubleword conditions to standard. */ +static int cmpbid_c(DisasContext *ctx, int val) +{ + return val ? val : 4; /* 0 =3D=3D "*<<" */ +} + =20 /* Include the auto-generated decoder. */ #include "decode-insns.c.inc" @@ -3101,9 +3107,12 @@ static bool trans_cmpb(DisasContext *ctx, arg_cmpb *= a) =20 static bool trans_cmpbi(DisasContext *ctx, arg_cmpbi *a) { + if (!ctx->is_pa20 && a->d) { + return false; + } nullify_over(ctx); return do_cmpb(ctx, a->r, tcg_constant_reg(a->i), - a->c, a->f, false, a->n, a->disp); + a->c, a->f, a->d, a->n, a->disp); } =20 static bool do_addb(DisasContext *ctx, unsigned r, TCGv_reg in1, --=20 2.34.1