From nobody Wed Nov 27 20:34:12 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=1697666484; cv=none; d=zohomail.com; s=zohoarc; b=XUcljg4rrJvHb7/7UMsaTWqrQ5H+fzqtHmRuk6gBGmMnC60FSmynQod2Jco9ja7ql1LrcZhOCylqr5hmjFyRIn2rTPtGxXHStCJMuOjeTp+X+xPwnzorRizb8P1StgxlCShi5bUrbs2CbgdSXUvAZQDfJeSYBQuvpuaIjMCvY0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697666484; 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=+3Cca9a0dUfxOMmsrbDZSCnt4BuRnsfCclCPiSMy9B8=; b=TYbJR1sZxn1TqOjtviAC4z5iRyLRZ2wLFLvWCCRGceKVWPFVD+kOirp3rM0qrOE4pBpfnBj3ymJjiSoW8gJ5fRY7x+MQF/0QgAUvxp5Ki9zbxqn57plsUhth9073N//W0bqGwmcm9fB4m5wQS5N3q1m23c5NpohmTL+JcXNhivQ= 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 1697666484214271.7291184154765; Wed, 18 Oct 2023 15:01:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtESl-0001y8-OJ; Wed, 18 Oct 2023 17:52: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 1qtESE-00015D-IR for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:51:50 -0400 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtESA-0004OH-AP for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:51:49 -0400 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-1c0fcbf7ae4so5076552fac.0 for ; Wed, 18 Oct 2023 14:51:45 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id w17-20020a63f511000000b005b61a024ec7sm2176380pgh.74.2023.10.18.14.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 14:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697665905; x=1698270705; 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=+3Cca9a0dUfxOMmsrbDZSCnt4BuRnsfCclCPiSMy9B8=; b=FVjQ2RAtxT2KrWlgEhrtiRn00QAYXOTeYlkbbVIN3yG3ng8WFSj96ZMMGaTah4QxFg QMZ1BrMAbIyp5aucF3Roz93ylnmrxIgAXD5GhwbjMbQug3okqnNj9tjDagXUbeOantxE nes0asv+XxAWQ1r6q1DgyVgoCUDVduyoqGiYenI3vB8JzF4VTxDGkVp4p+NMMgzliXit efZJKExF861l9kXuV1k8M8L7gCV49WW7mD+OI7DLkS+QMEAKxqYvFmuTRpQTC3O2Otfv 7C9uVOtLDFpRcz64/8lPV2Xk//7MI8olf00yHe4q022wke98WpL/NO0ZYPVDJDWBOr+6 z/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697665905; x=1698270705; 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=+3Cca9a0dUfxOMmsrbDZSCnt4BuRnsfCclCPiSMy9B8=; b=T3GX8F1zQ0vnFOkU4fRdZ2a8ACmCDSCaw5hTKGYArBbzXJyZBD0zAtgGWXbicy46KG fkVsPWVPU+F9LkjChEgkeJOr+Vh42CmSyvDOVg5UHoJC5lzS/d5SiHLeTOogvs4xOT4k ur9gnZteQO3VPsPsHglAA3kFcQ2/6UjpWVB/wUocfv02MrgYddIo4ZA3xZTN/+Npyc9B +U6/SkUhg/zSJU8vKseKsmsLvprWUlWdPZPOjsAdXhCAAeWr7EqmYtepGmDDeIP59JZq ARCZ4corBOQRucwEkuWCC4jzADGYey/HRX861UVU/vNwH2NTJdbO6Ecut/8WbWb228on 1XLQ== X-Gm-Message-State: AOJu0YxgMAu4LBiRObfjr6ztDbd4r1mzoxDB4oouXHkd1QOMuJQAiyM9 ySgGyTjcPkBLNI4PyHzU5Q6KqWSWTXXWpy0jgds= X-Google-Smtp-Source: AGHT+IHEPmoPeHeiK1hyU8bwnzH2S3Fc8i9VLTYf8jnAoXPIT2l5/4IEoWTO3RFjY7lWAQXR9/Lf7g== X-Received: by 2002:a05:6870:1094:b0:1e9:f0ef:dd8b with SMTP id 20-20020a056870109400b001e9f0efdd8bmr609837oaq.54.1697665905146; Wed, 18 Oct 2023 14:51:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH 10/61] target/hppa: Fix bb_sar for hppa64 Date: Wed, 18 Oct 2023 14:50:44 -0700 Message-Id: <20231018215135.1561375-11-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=2001:4860:4864:20::2a; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x2a.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: 1697666484768100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/hppa/translate.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8ebe7523a7..119422870c 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3073,14 +3073,21 @@ static bool trans_bb_sar(DisasContext *ctx, arg_bb_= sar *a) { TCGv_reg tmp, tcg_r; DisasCond cond; + bool d =3D false; =20 nullify_over(ctx); =20 tmp =3D tcg_temp_new(); tcg_r =3D load_gpr(ctx, a->r); - tcg_gen_shl_reg(tmp, tcg_r, cpu_sar); + if (cond_need_ext(ctx, d)) { + /* Force shift into [32,63] */ + tcg_gen_ori_reg(tmp, cpu_sar, 32); + tcg_gen_shl_reg(tmp, tcg_r, tmp); + } else { + tcg_gen_shl_reg(tmp, tcg_r, cpu_sar); + } =20 - cond =3D cond_make_0(a->c ? TCG_COND_GE : TCG_COND_LT, tmp); + cond =3D cond_make_0_tmp(a->c ? TCG_COND_GE : TCG_COND_LT, tmp); return do_cbranch(ctx, a->disp, a->n, &cond); } =20 @@ -3088,12 +3095,15 @@ static bool trans_bb_imm(DisasContext *ctx, arg_bb_= imm *a) { TCGv_reg tmp, tcg_r; DisasCond cond; + bool d =3D false; + int p; =20 nullify_over(ctx); =20 tmp =3D tcg_temp_new(); tcg_r =3D load_gpr(ctx, a->r); - tcg_gen_shli_reg(tmp, tcg_r, a->p); + p =3D a->p | (cond_need_ext(ctx, d) ? 32 : 0); + tcg_gen_shli_reg(tmp, tcg_r, p); =20 cond =3D cond_make_0(a->c ? TCG_COND_GE : TCG_COND_LT, tmp); return do_cbranch(ctx, a->disp, a->n, &cond); --=20 2.34.1