From nobody Wed Nov 27 20:48:21 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=1697835048; cv=none; d=zohomail.com; s=zohoarc; b=Dd9MBn/iUZ279Aaloax2WaWlIQ5MdWdUUIDk/PAGxAsSxGANhf1aZfefrObGXGZM4x5G9Duzfy5yBZYGdZWYEZ49n1hTvNw1q38Xbs2F1Yjix/mdopOBN/xlPdLsQC/ftqVZuGmteMIBKMudaexVprZI//QKCaZSkoOgiprXchI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697835048; 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=T6DEfOhGSAuzHVOiFy6ZRmh1nqeZSzZi7HDKv5g8+j0=; b=NqvBHQSTf17os+8O1/VzBCxkNNRn48zM4ZJzsbLozeXxWhxH2gHeompu75SPAGIXDvD8HonroCC1nWw3TqtkZJcsQIlAWoSRByyFwsa0ZhfNwcdrNPrKGEyLPUX02GF77jq8KXhrVvfr7UfDfb8tP+zmPtYGR2myH5+/oMDAzMA= 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 1697835048724674.6466119951767; Fri, 20 Oct 2023 13:50:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtwLv-0007tw-LL; Fri, 20 Oct 2023 16:44:15 -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 1qtwLV-0007jQ-TZ for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:43:52 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtwLS-0008AL-U4 for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:43:49 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6bd32d1a040so1213420b3a.3 for ; Fri, 20 Oct 2023 13:43:45 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id k15-20020aa7998f000000b00688965c5227sm1944975pfh.120.2023.10.20.13.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697834624; x=1698439424; 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=T6DEfOhGSAuzHVOiFy6ZRmh1nqeZSzZi7HDKv5g8+j0=; b=BsNZ67kc7dWCgOMVsBf0JFCqD79DLaZDrGCUzvsdUCPWwm6gQhnrpuq8SzI/7/7bkf VIuV7gu8G1cQPiPUIz4TksdANcT0tQlqRY7GGJ5/dcnaU66DNvtoCNo3JeMT/hku9FCV zs+66E+kR1tr6XrTyFqoMw1D7qdPvmOTyYhRdkplyoG0ZAZC4aqrWCyI+sVC0u1bBSy9 KadQDApw5c//NAl8We7C4yeZpSou3eQ/HUgxYabVe4nFI3dUmoZAB6q7SDR2KOH1CQCJ 6EuWM/rCDXnpWyhSmZvlVCy3y+Q6SeVofK7PGU1bw8NThnPAbZ0JTbBgOE7DXyrovCGH KRAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697834624; x=1698439424; 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=T6DEfOhGSAuzHVOiFy6ZRmh1nqeZSzZi7HDKv5g8+j0=; b=o0OisxBZBumrWwkq5h3KMX6IGsIU+cA0VyW4ayT59jFWQmPU71q1kqiMZuALR3lPsj HjeJ6+l8Sp8aMDu1Ma2LkdFs+JyWhyHJKcWG5oUxQAA88B0EWZnFvxrN8moIx+IrwLPg uRfdbYq/57UU8CfoaiH6j/AnFANltZoiu5EXAn5qII29ZdLA4XCvahwraIZvHdh8iCkE /P/R7tesV31ZNnDxM4lNpIYF9tuKPkIg+nTIrYrbxhumdFgxTUIspPVpBYaDZzsbvXlo b1eawsemXRLq1NtvBBJr7vywp77cT8g5JevEwWWRKifnMQb5zLUoTadcBRnHgKtsnfGC 0YuA== X-Gm-Message-State: AOJu0YxPkejekG7aynsEghq4L5qz+ffWYTaUWzilguJGxHtGPhMqm+Q9 /Z+6K9jHMAADpS6ndLHDUnoJT4Gjz0bIohWidow= X-Google-Smtp-Source: AGHT+IHqB3WJ/vu9PLoRlGuVe5QnRyuvoHJi1cgadBn0jjy5vDe6Xk1F9HxDKAEpBzk+MmWbSvfyNA== X-Received: by 2002:a05:6a00:84f:b0:6bd:b3b9:649f with SMTP id q15-20020a056a00084f00b006bdb3b9649fmr3273030pfk.7.1697834624318; Fri, 20 Oct 2023 13:43:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v2 12/65] target/hppa: Fix extrw and depw with sar for hppa64 Date: Fri, 20 Oct 2023 13:42:38 -0700 Message-Id: <20231020204331.139847-13-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::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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: 1697835049114100001 Content-Type: text/plain; charset="utf-8" These are 32-bit operations regardless of processor. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 119422870c..f86ea9b9ca 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3230,7 +3230,9 @@ static bool trans_extrw_sar(DisasContext *ctx, arg_ex= trw_sar *a) tmp =3D tcg_temp_new(); =20 /* Recall that SAR is using big-endian bit numbering. */ - tcg_gen_xori_reg(tmp, cpu_sar, TARGET_REGISTER_BITS - 1); + tcg_gen_andi_reg(tmp, cpu_sar, 31); + tcg_gen_xori_reg(tmp, tmp, 31); + if (a->se) { tcg_gen_sar_reg(dest, src, tmp); tcg_gen_sextract_reg(dest, dest, 0, len); @@ -3355,7 +3357,8 @@ static bool do_depw_sar(DisasContext *ctx, unsigned r= t, unsigned c, tmp =3D tcg_temp_new(); =20 /* Convert big-endian bit numbering in SAR to left-shift. */ - tcg_gen_xori_reg(shift, cpu_sar, TARGET_REGISTER_BITS - 1); + tcg_gen_andi_reg(shift, cpu_sar, 31); + tcg_gen_xori_reg(shift, shift, 31); =20 mask =3D tcg_temp_new(); tcg_gen_movi_reg(mask, msb + (msb - 1)); --=20 2.34.1