From patchwork Wed Mar 20 00:32:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781347 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65406wrj; Tue, 19 Mar 2024 17:33:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVLp3cleHnShdK/NxM2TadOxNMV7LS6FBfKmyPfX0AwC4tY8q+cAq7JSvvDw5nzlrxvsUoACLInbZMxo6mPYLU6 X-Google-Smtp-Source: AGHT+IG0cQo0LSBEdPaeGGrS1sTrABudFSoDCZvRXicd0gOA7CA1uYxRPw6oYv7bwyrdwSUMDeVY X-Received: by 2002:a05:620a:1361:b0:78a:1e58:e4e2 with SMTP id d1-20020a05620a136100b0078a1e58e4e2mr1656568qkl.4.1710894815724; Tue, 19 Mar 2024 17:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894815; cv=none; d=google.com; s=arc-20160816; b=gjTer9/uXhUvNHFzHd36wvZq4nu1eMPDK5PK4lN2OtXYlaqvSMvsjKfwJ3nIK99UH1 9KvB9whj2s1GbO+9RCw92q95edDKAReUhFaSbzFIp5e1tX98ljg1zl6AhtH10+q03PwF Qi2u+wWie1R0HAMjbCsxoEHjGd6jdu3fiNa+XBn+qvd2SeVRKaO/jpkbLdpeBGp0eQce Y4L3U9sl/gYT9hMZMqS2cOM4GfsNHyrkFa6a0tm8twJKWJkyMAVtwOa4/y3o/ZDn+zAr Y6yqSmxpU1Q1H4V7l+rvhxICSerzKC5sDCwTcNbZqrg0h1gQPRsFyL84GbRQkWEKYEsV I9lA== 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=k5PnQhFXfvSe92fnLRbZ5TBOd12ifIZn+pMwnRQCRuU=; fh=j6oUJOIe/HZ0oApVqODA+wb5Tv03Z1vlJlVjpDwxhHo=; b=Bf5ebAFHrGHYg4NC+duMdIgOuaphOu/Jfl8n3YGRdS2AERasyCBg3mcre/CcSCdS/+ MvsqT5N0qG9l2BGHndjbh7F/pmfG3rkysHOiMar8gEDdyqdDAM2gCuL8kfTpygHw/Elx b68f1CM+DcOLLDaNFzRRvlBdj4CPmWzl/eJvQm+sKvpbuATFykeI1cvNnqQ6r8dftOHM JbsuMT6/6CihDGhvIzl7szDyRAZauGT/u4yXUw3ChdNLO0NqvpJnBipmRAmUZUkGiWBd vaiabMvdjhIAdso8hI+3Zm6hV4J7g+oJwBYEuzWP7dV8/ldmNBApY0smGxMWxVySK4dN MwCQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QYV+A2ss; 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 vu13-20020a05620a560d00b0078a1ec51af1si658442qkn.437.2024.03.19.17.33.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:33:35 -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=QYV+A2ss; 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 1rmjse-0008Ut-6F; Tue, 19 Mar 2024 20:32: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 1rmjsc-0008UK-Kz for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:30 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsb-0005WK-2g for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:30 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6e6ee9e3cffso284120b3a.1 for ; Tue, 19 Mar 2024 17:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894747; x=1711499547; 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=k5PnQhFXfvSe92fnLRbZ5TBOd12ifIZn+pMwnRQCRuU=; b=QYV+A2ssMwBE2QTBfTdLU5Io6vlELcb3AleNKYzcBEy42TbLrrX+xahpfZad5g314i gU8kzxQJ7Iu6bkn6wrYJdWdboz/jrzIMKSSQwr+T1dOUZu0Pt5OOcwaMMb1GMrT5oztR YOxWpZbIrPYsV0yHsXjX4XX9EJ2WI5d0gOTzALFEk9Dt0zC7PUX6S5jJOeombmC86CiU 6CJjqE7nF91Tkr4yIeufC7ba6YYts0idUH7RSZ6wxDv9qPaeBFnkLoJTghIG2+uPN/Jz Yy1UNdvqxaCfYqYlKGXVz9WL85a6L/dY1J0l/OxuumjXF+QkOiQ2TC7rqwT6Ny+7G3iq 7wFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894747; x=1711499547; 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=k5PnQhFXfvSe92fnLRbZ5TBOd12ifIZn+pMwnRQCRuU=; b=KysUkeNrYET6YS9LtqfaKDo/zdLicihLpsBr64lE87FriyEUotVf+eT8tPr9JFyiFw n2SMa7/E05un/wrZwY52T4Bu97cM5eD2u2YdtQi8bqAnH6Rrug8UWcQ+mqH+HihYRPcM 8kSTGSJ/Y7pSLj+66kbJT2zJvQtJyUSZ6Bn/eydpzhG14BErfjp+UqIVuP61py8Rb8W0 TWqQT8rFjEs3zkd7eBY50X+PaH5agiZXeMf/2CfxXH9XCrVnPJWXeJSJJ3r2NwhBtYrA fsXRydNqiEeqWGk0C77vsKKtTMRHyCeExn1P2n/5Bz2qzNdkURtqb2hnMGTZCnSI34q9 VdrA== X-Gm-Message-State: AOJu0Yxsz90cQHd++zCg4gI3M6NaUP932ps9K6ligfzWHAnzerjRaP1C OvzVKO8lpoqLglk2O/hBe7Vi1aA9aPGLGdiyo4AJbNbWYknQsdPrwz57c2cAr4+zl5Hd1IuV+vz O X-Received: by 2002:a05:6a00:14c4:b0:6e6:ba5a:2c4e with SMTP id w4-20020a056a0014c400b006e6ba5a2c4emr5668979pfu.7.1710894747394; Tue, 19 Mar 2024 17:32:27 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle , Helge Deller Subject: [PULL 1/9] target/hppa: Fix assemble_16 insns for wide mode Date: Tue, 19 Mar 2024 14:32:15 -1000 Message-Id: <20240320003223.554145-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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 Reported-by: Sven Schnelle Reviewed-by: Helge Deller Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 15 +++++++++------ target/hppa/translate.c | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index f5a3f02fd1..0d9f8159ec 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -27,13 +27,14 @@ %assemble_11a 0:s1 4:10 !function=expand_shl3 %assemble_12 0:s1 2:1 3:10 !function=expand_shl2 %assemble_12a 0:s1 3:11 !function=expand_shl2 +%assemble_16 0:16 !function=expand_16 %assemble_17 0:s1 16:5 2:1 3:10 !function=expand_shl2 %assemble_22 0:s1 16:10 2:1 3:10 !function=expand_shl2 +%assemble_sp 14:2 !function=sp0_if_wide %assemble_21 0:s1 1:11 14:2 16:5 12:2 !function=expand_shl11 %lowsign_11 0:s1 1:10 -%lowsign_14 0:s1 1:13 %sm_imm 16:10 !function=expand_sm_imm @@ -221,7 +222,7 @@ sub_b_tsv 000010 ..... ..... .... 110100 . ..... @rrr_cf_d ldil 001000 t:5 ..................... i=%assemble_21 addil 001010 r:5 ..................... i=%assemble_21 -ldo 001101 b:5 t:5 -- .............. i=%lowsign_14 +ldo 001101 b:5 t:5 ................ i=%assemble_16 addi 101101 ..... ..... .... 0 ........... @rri_cf addi_tsv 101101 ..... ..... .... 1 ........... @rri_cf @@ -306,10 +307,12 @@ fstd 001011 ..... ..... .. . 1 -- 100 0 . ..... @fldstdi @ldstim11 ...... b:5 t:5 sp:2 .............. \ &ldst disp=%assemble_11a m=%ma2_to_m x=0 scale=0 size=3 -@ldstim14 ...... b:5 t:5 sp:2 .............. \ - &ldst disp=%lowsign_14 x=0 scale=0 m=0 -@ldstim14m ...... b:5 t:5 sp:2 .............. \ - &ldst disp=%lowsign_14 x=0 scale=0 m=%neg_to_m +@ldstim14 ...... b:5 t:5 ................ \ + &ldst sp=%assemble_sp disp=%assemble_16 \ + x=0 scale=0 m=0 +@ldstim14m ...... b:5 t:5 ................ \ + &ldst sp=%assemble_sp disp=%assemble_16 \ + x=0 scale=0 m=%neg_to_m @ldstim12m ...... b:5 t:5 sp:2 .............. \ &ldst disp=%assemble_12a x=0 scale=0 m=%pos_to_m diff --git a/target/hppa/translate.c b/target/hppa/translate.c index eb2046c5ad..cbe44ef75a 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -144,6 +144,28 @@ static int assemble_6(DisasContext *ctx, int val) return (val ^ 31) + 1; } +/* Expander for assemble_16(s,im14). */ +static int expand_16(DisasContext *ctx, int val) +{ + /* + * @val is bits [0:15], containing both im14 and s. + * Swizzle thing around depending on PSW.W. + */ + int s = extract32(val, 14, 2); + int i = (-(val & 1) << 13) | extract32(val, 1, 13); + + if (ctx->tb_flags & PSW_W) { + i ^= s << 13; + } + return i; +} + +/* The sp field is only present with !PSW_W. */ +static int sp0_if_wide(DisasContext *ctx, int sp) +{ + return ctx->tb_flags & PSW_W ? 0 : sp; +} + /* Translate CMPI doubleword conditions to standard. */ static int cmpbid_c(DisasContext *ctx, int val) { From patchwork Wed Mar 20 00:32:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781352 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65598wrj; Tue, 19 Mar 2024 17:34:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXDcu9SvPsyI2kobUUTWSylsDznEufHieCCgDruIMXs2cHQ1xzXpUIc8vgFIBa1AVHbocYkZqi82Q2sDTxWlu65 X-Google-Smtp-Source: AGHT+IGHzwZcuRsNK+Nh4H8SZmXLJAJm9wXZMtA2mb8jqCHWPguXnqxWXGr5nh1NPnEzUXh7mKmH X-Received: by 2002:a25:4657:0:b0:dcf:c086:dd43 with SMTP id t84-20020a254657000000b00dcfc086dd43mr10407341yba.14.1710894857589; Tue, 19 Mar 2024 17:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894857; cv=none; d=google.com; s=arc-20160816; b=VoknnxsrJrEVlUoiQQUXKddKR2SWfW+moS/96Q7hKKWkanBRD9DR8aZolVaP0Zf3z3 3H8qf1NZr3a8ZwsHANfordQMXgU37SUabsmL1PJjJx5ra4HC90pNpIPfuAR7xOQqVZA6 m3AeHfwu9DAMfpDazAssDWw7xybuLLOq4RgUMDGTQ+cCY1PkXJ/6OmzPkBmz+soaPKZm NYCF8OscfYeZRSMZd0Pl352suoNPLAaDRihOoYMGRV6yc5Js5XNqNZ118MvKNYIbg/dv TKb6StSJBYUC1DYZUUdwHwK+qYRH1CP3vBa9Gy+VSDaZxtgj9L4smi/AhJpiTcpLP/U7 B3nQ== 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=ukEfuyWQnP9Sb76LI5tjGbSBopWDatLwKjWYccct6BU=; fh=hkbyWW5xZRw3ri7c5jPpVmtujBERfGCXX51JsOQjOVE=; b=AF/K0xxG5flIoeqYmAeLiTsMh85SPIBIGToclbtkT4pyXpgYEQtW7vm2/PGF7L+QNK pDFiEukCqeU0M//4kDK1SlnmBmW2vTQbcRrRpkR29DYzBHx5LkYmaPD2xWd6Uu5n+ADY 5w8M3R8hWkODOx3IW77c9RcY1WR1TWNFcrKG1G1VrlMlfddibFj/FEyD9wCIwIEuif4j SbHa7pXhocLkge5ClwiJe8dUyGIOyFec5RBO0hkBkB5whPacHd5q3V8jJvbCMreAZME7 K0CBpyvGizGwxYmAojpnvp8J3K1eHJYbsS569noyLnabqhQThhm82Q83Lo2UBLFrOcWK ntAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GyzHEBp6; 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 c4-20020ac87d84000000b00430ce7d3e6bsi6040263qtd.52.2024.03.19.17.34.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:34:17 -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=GyzHEBp6; 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 1rmjse-0008VE-H2; Tue, 19 Mar 2024 20:32: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 1rmjsd-0008UX-Ei for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:31 -0400 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsb-0005WU-SR for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:31 -0400 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3c39579af51so934250b6e.3 for ; Tue, 19 Mar 2024 17:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894749; x=1711499549; 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=ukEfuyWQnP9Sb76LI5tjGbSBopWDatLwKjWYccct6BU=; b=GyzHEBp6naIADOy44Q+stQboeD7n7ysIs6SiXWyMgr2/GGYImpe7CQReSZo6GbmrQX wKhotJu94egf4+iu8sMHjdPgL/mVw0vOq/fRPrOFtpLr6RtertWYdmpdKZbymuI4Z20/ TBhN6EYdgrhxHOSA20rqARdn4Asn226/41RuRgEG49oXvuF7potEe6Pgr0RAmtNuNAHv zXAZZauivVWknZEBIqWDbVtM3r86LVt3qdWGW8BRSnVKOVX0ETzGYgVNmxNejnxKHlIK Si7qyxCapYciBWUyHWC3aF16y32Cv7u64LOkcFvh5uspsmsR6bwtV8MPN67/q7aLmA7u /OYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894749; x=1711499549; 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=ukEfuyWQnP9Sb76LI5tjGbSBopWDatLwKjWYccct6BU=; b=pvsy15ynd/oy90IUorIgNgxo+YTZ++ZUKiYCT6VgQSvHWsDWtw6dSZ3rs1SrQIVGRG taEtxievAvmXR9TtMalj23ZyOOWVFAz3PIzLHJqBBmWB7HApfNN4RWNZo3pmN8Uzkd6L q+fbjItQvqHTmFp0VgWJa6ijFudy6gjQSNDiLEU2XyP1P9lsds1wJqbjEMK0qlSvfa1y jhtSe4x44sSE+N8gcmkrauyKzVostMAbiZiejtRhNfoYZsfRvXA8y6guKXsKprUlaF61 Hdezl3yuVi3lCpdR5lhfZBC4aHOt+/lya76XrJhiBlrsUTeTWhaPpapl+YWJRNCyhGQZ I1Dg== X-Gm-Message-State: AOJu0YxxGrgZoqf/3TlmrHP3wBuVHWQM5Ru9IIUj0i7Aa7AFIajjHJj4 CuJaAcLL+imP+pkd58VvOjqu+CTCm0eg6beC4hOiLf6r0c+iMstWA+3w5G2O/D09BrXIL8sKv6j A X-Received: by 2002:a05:6358:5207:b0:17e:76a1:8b7e with SMTP id b7-20020a056358520700b0017e76a18b7emr16489706rwa.4.1710894748706; Tue, 19 Mar 2024 17:32:28 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller , Sven Schnelle Subject: [PULL 2/9] target/hppa: Fix assemble_11a insns for wide mode Date: Tue, 19 Mar 2024 14:32:16 -1000 Message-Id: <20240320003223.554145-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22c.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 Tested-by: Helge Deller Reviewed-by: Helge Deller Reported-by: Sven Schnelle Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 7 ++++--- target/hppa/translate.c | 23 +++++++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index 0d9f8159ec..9c6f92444c 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -24,7 +24,7 @@ %assemble_sr3 13:1 14:2 %assemble_sr3x 13:1 14:2 !function=expand_sr3x -%assemble_11a 0:s1 4:10 !function=expand_shl3 +%assemble_11a 4:12 0:1 !function=expand_11a %assemble_12 0:s1 2:1 3:10 !function=expand_shl2 %assemble_12a 0:s1 3:11 !function=expand_shl2 %assemble_16 0:16 !function=expand_16 @@ -305,8 +305,9 @@ fstd 001011 ..... ..... .. . 1 -- 100 0 . ..... @fldstdi # Offset Mem #### -@ldstim11 ...... b:5 t:5 sp:2 .............. \ - &ldst disp=%assemble_11a m=%ma2_to_m x=0 scale=0 size=3 +@ldstim11 ...... b:5 t:5 ................ \ + &ldst sp=%assemble_sp disp=%assemble_11a \ + m=%ma2_to_m x=0 scale=0 size=3 @ldstim14 ...... b:5 t:5 ................ \ &ldst sp=%assemble_sp disp=%assemble_16 \ x=0 scale=0 m=0 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index cbe44ef75a..40b9ff6d59 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -121,12 +121,6 @@ static int expand_shl2(DisasContext *ctx, int val) return val << 2; } -/* Used for fp memory ops. */ -static int expand_shl3(DisasContext *ctx, int val) -{ - return val << 3; -} - /* Used for assemble_21. */ static int expand_shl11(DisasContext *ctx, int val) { @@ -144,6 +138,23 @@ static int assemble_6(DisasContext *ctx, int val) return (val ^ 31) + 1; } +/* Expander for assemble_16a(s,cat(im10a,0),i). */ +static int expand_11a(DisasContext *ctx, int val) +{ + /* + * @val is bit 0 and bits [4:15]. + * Swizzle thing around depending on PSW.W. + */ + int im10a = extract32(val, 1, 10); + int s = extract32(val, 11, 2); + int i = (-(val & 1) << 13) | (im10a << 3); + + if (ctx->tb_flags & PSW_W) { + i ^= s << 13; + } + return i; +} + /* Expander for assemble_16(s,im14). */ static int expand_16(DisasContext *ctx, int val) { From patchwork Wed Mar 20 00:32:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781343 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65211wrj; Tue, 19 Mar 2024 17:32:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWxEcW9eDtFTmNLX8th638Rj6Uw+EiA5kTiO/nWfpWQlft1Jpptp+yuIMFp2soTQJ1yXgDEFSWl6D1vlT0bZXQ0 X-Google-Smtp-Source: AGHT+IHHWkIh3mhC6d0UskZX0jj0GXW8Ry+ee8uBdo/Np3+h3NYxxD0Da8154qYNymRDexK+Xpt+ X-Received: by 2002:a05:6122:1da7:b0:4d4:4703:e7a8 with SMTP id gg39-20020a0561221da700b004d44703e7a8mr8640094vkb.15.1710894770167; Tue, 19 Mar 2024 17:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894770; cv=none; d=google.com; s=arc-20160816; b=X4SETHolRFRMaRR9g/gmsDM405v+NZf66hU1Rs6gTgBVlEnWbYCTlnhLWM7L+EpIeI 4jpbnwo65CxS0GBbSzx7Hy9dE8oAqGZbBNmzipjK8ZQG9w1RZlp13M8rldbiM6W26I14 DX9RguOVCIvnEVRC0WkuyhD05d5qeowoaDcxaXDo1d8p299KYnJ3LORcw6LZO5bPc+Tp tGAQAl5zAXMQ5Qbt89JWhy43+D/dJ+PnZNrP4rYCTt//BwC5j0ZONa+J/hV71Y/Mkke+ qK8OO/bX+nEmiH5WNyQhXotPg8d4w9RBklhBPPeVU2/k/4mRLPCRzLGaxaLCE8JkdMpc uPlA== 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=Q6aglnROJwkY+5hRbPbUV1QnS5K81iLfR/yfvt3Y7ig=; fh=hkbyWW5xZRw3ri7c5jPpVmtujBERfGCXX51JsOQjOVE=; b=n8v1/XRqNOpZiJFu8yyOX77EunkrDvkCw63XRs0MZKX3Ze/5oBwUnvRoNbrnsdIIuF aNz3tTSliFUjf8EgPYcUwFgI1zY1t2HTKIysZagJA7SbmbO7Ltu/1ojYIwRotTs1PcLp 6HZz7mqYUCVi8tydjawmsfmpO2xOY1fIbac33ziBVZyvzx1kt8SZR4uFH2lzWX3y2I+3 G+A6oNDkWL316+QAh4W+vubl72t84/RhHYEahWra9hNQIYg7+aKYZyD8KOcyDYmk5ePz JsKP62pmPk8X+zKdiKa26M9bHd0/vPDN+fvoxi6y3Zb/l2E7BrIlYzj/KfCs00S6vAPq kNsw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yrcXlrTO; 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 iv11-20020ad45ceb000000b00690774422c7si12267160qvb.345.2024.03.19.17.32.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:32:50 -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=yrcXlrTO; 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 1rmjsg-0008W1-Ls; Tue, 19 Mar 2024 20:32:34 -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 1rmjsf-0008VT-Bo for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:33 -0400 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsd-0005Wt-Os for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:33 -0400 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-2218a0f55e1so3615827fac.1 for ; Tue, 19 Mar 2024 17:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894750; x=1711499550; 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=Q6aglnROJwkY+5hRbPbUV1QnS5K81iLfR/yfvt3Y7ig=; b=yrcXlrTO+W2TJdZ5XB6kQH+fBIt5M/j6SBaQADFN7FsDliwQJKh3Pc6NBBQsTOijGB j4aZFs+RNlE+kzFTWWVXEmo58ry4eeJzB8I8IztsKf5tbCDjWhX29bjVJjPP0RW92Fz5 BnqUKs9caCvXNFcG/qJ6CZnu485j3dwHt5JRkzHDRox82zl4v9FbwenOYP4LqEqakKwv VU/O8qY3WV4g1aY2WRBlVajCu3HjeFHcQeF7u4bsqOTBi9+S4CK2aeakQkCLP8GcGmFi 13Hy5c98pI1mpaFpUV7MoNvCV+9q70IeJdN+0yC/PSA9YCHbD9eWKNm180V8Rvw6HvO6 wk8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894750; x=1711499550; 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=Q6aglnROJwkY+5hRbPbUV1QnS5K81iLfR/yfvt3Y7ig=; b=BsxfYNYFMM9VSgGsf1d7N2SvEB0EkR177J/8Pobc3/044YjKK4xeRhhVFGZezfoEei V4TG1izOdYMYDU8pXEc7O4KNlDDgBwPDXUKB5fSYEQTewMkZ1slKUnMLZfRD955B0yXA KKtg7kCnuxgvxtgC8yxRxa7eehGl+lMK3BbhjiUqgw/ZA1lEaUpCgovOzl9K+IcUFjYZ GsBiuI+kNY9ePeunZe/VG+LeSoA3FVKjzVcxog07c/nqOjdAyXeT3BsEHBJSWrscOkDw 1oq5kCuRW8eELNWm+qvoybCoq8n5uCigt7H3tRRUUs8Ol8zbEkNqmUqZLVE7oh86wexe hOQA== X-Gm-Message-State: AOJu0Yy1Pb0zjLy7smMlSTys2NfJUj9dHM5+eOXnPEnIQX3xHcfmLBIg 0faLKYq5a98c38rjqPJ8zJAuzIpRSwAnjy9Jr08wCAMvB/5/RN4RoImeg0qEM/DO77/rwl1P9e6 a X-Received: by 2002:a05:6870:4723:b0:21e:e476:9170 with SMTP id b35-20020a056870472300b0021ee4769170mr17905258oaq.43.1710894750358; Tue, 19 Mar 2024 17:32:30 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller , Sven Schnelle Subject: [PULL 3/9] target/hppa: Fix assemble_12a insns for wide mode Date: Tue, 19 Mar 2024 14:32:17 -1000 Message-Id: <20240320003223.554145-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::31; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x31.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 Tested-by: Helge Deller Reported-by: Sven Schnelle Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 27 ++++++++++++++++----------- target/hppa/translate.c | 17 +++++++++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index 9c6f92444c..5412ff9836 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -26,7 +26,7 @@ %assemble_11a 4:12 0:1 !function=expand_11a %assemble_12 0:s1 2:1 3:10 !function=expand_shl2 -%assemble_12a 0:s1 3:11 !function=expand_shl2 +%assemble_12a 3:13 0:1 !function=expand_12a %assemble_16 0:16 !function=expand_16 %assemble_17 0:s1 16:5 2:1 3:10 !function=expand_shl2 %assemble_22 0:s1 16:10 2:1 3:10 !function=expand_shl2 @@ -314,8 +314,9 @@ fstd 001011 ..... ..... .. . 1 -- 100 0 . ..... @fldstdi @ldstim14m ...... b:5 t:5 ................ \ &ldst sp=%assemble_sp disp=%assemble_16 \ x=0 scale=0 m=%neg_to_m -@ldstim12m ...... b:5 t:5 sp:2 .............. \ - &ldst disp=%assemble_12a x=0 scale=0 m=%pos_to_m +@ldstim12m ...... b:5 t:5 ................ \ + &ldst sp=%assemble_sp disp=%assemble_12a \ + x=0 scale=0 m=%pos_to_m # LDB, LDH, LDW, LDWM ld 010000 ..... ..... .. .............. @ldstim14 size=0 @@ -331,15 +332,19 @@ st 011010 ..... ..... .. .............. @ldstim14 size=2 st 011011 ..... ..... .. .............. @ldstim14m size=2 st 011111 ..... ..... .. ...........10. @ldstim12m size=2 -fldw 010110 b:5 ..... sp:2 .............. \ - &ldst disp=%assemble_12a t=%rm64 m=%a_to_m x=0 scale=0 size=2 -fldw 010111 b:5 ..... sp:2 ...........0.. \ - &ldst disp=%assemble_12a t=%rm64 m=0 x=0 scale=0 size=2 +fldw 010110 b:5 ..... ................ \ + &ldst disp=%assemble_12a sp=%assemble_sp \ + t=%rm64 m=%a_to_m x=0 scale=0 size=2 +fldw 010111 b:5 ..... .............0.. \ + &ldst disp=%assemble_12a sp=%assemble_sp \ + t=%rm64 m=0 x=0 scale=0 size=2 -fstw 011110 b:5 ..... sp:2 .............. \ - &ldst disp=%assemble_12a t=%rm64 m=%a_to_m x=0 scale=0 size=2 -fstw 011111 b:5 ..... sp:2 ...........0.. \ - &ldst disp=%assemble_12a t=%rm64 m=0 x=0 scale=0 size=2 +fstw 011110 b:5 ..... ................ \ + &ldst disp=%assemble_12a sp=%assemble_sp \ + t=%rm64 m=%a_to_m x=0 scale=0 size=2 +fstw 011111 b:5 ..... .............0.. \ + &ldst disp=%assemble_12a sp=%assemble_sp \ + t=%rm64 m=0 x=0 scale=0 size=2 ld 010100 ..... ..... .. ............0. @ldstim11 fldd 010100 ..... ..... .. ............1. @ldstim11 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 40b9ff6d59..be0b0494d0 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -155,6 +155,23 @@ static int expand_11a(DisasContext *ctx, int val) return i; } +/* Expander for assemble_16a(s,im11a,i). */ +static int expand_12a(DisasContext *ctx, int val) +{ + /* + * @val is bit 0 and bits [3:15]. + * Swizzle thing around depending on PSW.W. + */ + int im11a = extract32(val, 1, 11); + int s = extract32(val, 12, 2); + int i = (-(val & 1) << 13) | (im11a << 2); + + if (ctx->tb_flags & PSW_W) { + i ^= s << 13; + } + return i; +} + /* Expander for assemble_16(s,im14). */ static int expand_16(DisasContext *ctx, int val) { From patchwork Wed Mar 20 00:32:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781350 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65435wrj; Tue, 19 Mar 2024 17:33:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1SqqqsEwYraynPU2teDuBAgOPkE+92QebhdQbfEWwbYNZ9/RnkWpotLS5skRUpRWLAovpcnO/BL0BCfZv/DKk X-Google-Smtp-Source: AGHT+IGgayB9qGS4+RE3XNGtgyKDNF0I3Z5KDzIEXjawn9hNdKqU/wRYxdz5UgJ7ga6A3o1iS4aT X-Received: by 2002:a25:ba8c:0:b0:dcd:b034:b500 with SMTP id s12-20020a25ba8c000000b00dcdb034b500mr475560ybg.43.1710894823219; Tue, 19 Mar 2024 17:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894823; cv=none; d=google.com; s=arc-20160816; b=qdLfu/q65QaP6mfg/N4ld4fIMumxJyRgTAOzAZ3MU2I2TOJWptA/6SIwfcyak7RyNE 7hNx03cC7BkM3vgCJag124+XUmtDu2WDSjQSVefm66I+n8qIxXtBnmf3E81jMfd/pCvy z8yo242Jzf/jsYEF0dCdZZ3ia9njQio7ULv5KnlZOQsor1duvVrHcs81I2mif7EtuCWD JTHc6eV5Q6jqGizNzFmmraZs6OTvyDLrwZxkROtwXNhlR2FJFVXoK2VlgiuByKnOtKC8 qVYlvPO2fr6LpZhRViga1hBdsWIq+KTNRGwe361mXpSY8VebDlCC6f8Y5XAYR5DSetkI kanw== 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=02J+igt5o8+h2PP+0HZoPaFUg0nUo/WrdtySb2LvSHk=; fh=VrHP4sfoKA8I1LkS7u+zyL5sfQ9auI1Z6YYiaQiPlIc=; b=dV4nuzpjeWqVxjOJZ0Vd8qqjo15nuMqzBeDy9qkMef3zN7QsbvI3qLZ9YJYkOpcAnD 68wD7hROTmBTgOtLQ5e9rv238kbiVp9vTn5xLgTWvd+SzIBmveangOPapbFiqtx4k2e0 31mYLYljCvYRWrdzznnqGr/7s4WFOSBu5H14z9PjmeHNR004cWERUdLgqJbtjZdLsvAk HImkDtZ9KGkaGfjEnSVsAM0Fyk66ymxTWWR3RP+KkO5JW2ycSoUcbqccSKjv5LkCATgX OO34JfewSPWxGHxJ+69vvIyZxXQEcFtosJUafBnVZYmKXdALy1uW7nZWQ4WpXgNH+5Cg CKKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LRnPt6hT; 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 mf19-20020a0562145d9300b006961bba141csi5518887qvb.154.2024.03.19.17.33.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:33:43 -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=LRnPt6hT; 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 1rmjsi-00004q-1W; Tue, 19 Mar 2024 20:32:36 -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 1rmjsg-0008W0-KR for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:34 -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 1rmjsf-0005XB-4w for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:34 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6e6afb754fcso5876874b3a.3 for ; Tue, 19 Mar 2024 17:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894752; x=1711499552; 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=02J+igt5o8+h2PP+0HZoPaFUg0nUo/WrdtySb2LvSHk=; b=LRnPt6hTKt80yKhLCvjqc+4OtR5kdLoQuDm6MS972S6dXNUrHkWuJ+9jCm0MN+DBA8 QxIKiCVJtgNdwcxc5y4FRRt6OXKE0AxTXWr4dGM9QsNOucbEd2LPTORB445qYCxQCtDS +8756Hjoq6PALeW2QIazwF78PFuwmoWAcFoIVHrO1y2zx3NNhgsonjP6sgSjiLHybdOZ h87TFXZSpsnFORkXj1xdb4q1FjqqKf1CIph17CQlG2rU7HQhmVC6U/IK8mYxFtZul9bv ONTlQzkmLjuV7RTIF91XPoVszZBXqEmcRB1dGHVtB/hcmOQzxY3q2z0dEkf4n9Dzbdj5 yqZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894752; x=1711499552; 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=02J+igt5o8+h2PP+0HZoPaFUg0nUo/WrdtySb2LvSHk=; b=ZyLy2//Nwx5v4Td0/56/VwhvBu68GsWDMvn/6YPHwAuVwWG64iBuCGRKiT7pKELpXm 9e1orsdpWoCpFe9jX6Tpsyw4MiQx5sSBoUOiuBxoqISsNzPnKNylSErV8yJoP4ZBDiHu IfJ2xpUViDPvQrtI0J2tp3KY7oH8Q+zmELxklJ3pea71VNIW6lS2voXsVpcpAHeIAT3U HjRXJ693QpxUukvKBS7b3Cmy7/ay/pXfeHGv8/FD6xz2AZr0JhSHH7sE6pV31pCFQmwY RVlaaSEhr914p9Vn4/P0Mx4cSGZ424FJznCqcvJWPVXw3BCRaTK3JVR/2xk3txntSCLJ /eVQ== X-Gm-Message-State: AOJu0YwsEu+bLweks/d+P8kWsPTUcGBX6aw2hQCc1kQjk5ZfFD2cr5GJ +MLHE1v6vV0nA2DW83wKuqihC/c6GecRfw/JcolU+hvNeoxcZ7Y9igf53vkkQiLKdoOB1Uc2rZn G X-Received: by 2002:a05:6a00:4648:b0:6e6:5343:c165 with SMTP id kp8-20020a056a00464800b006e65343c165mr723033pfb.16.1710894751641; Tue, 19 Mar 2024 17:32:31 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle Subject: [PULL 4/9] target/hppa: ldcw,s uses static shift of 3 Date: Tue, 19 Mar 2024 14:32:18 -1000 Message-Id: <20240320003223.554145-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 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, 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 From: Sven Schnelle Fixes: 96d6407f363 ("target-hppa: Implement loads and stores") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240319161921.487080-2-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index be0b0494d0..47c6db78c7 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3135,7 +3135,7 @@ static bool trans_ldc(DisasContext *ctx, arg_ldst *a) dest = dest_gpr(ctx, a->t); } - form_gva(ctx, &addr, &ofs, a->b, a->x, a->scale ? a->size : 0, + form_gva(ctx, &addr, &ofs, a->b, a->x, a->scale ? 3 : 0, a->disp, a->sp, a->m, MMU_DISABLED(ctx)); /* From patchwork Wed Mar 20 00:32:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781351 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65526wrj; Tue, 19 Mar 2024 17:34:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVAiYv0uO2dBdHxGr3F0LJOYy5vftslOnp615eVPH4npVNnrq5lBoEdzqTuXZr0dkbqQtTRFPlHMUc0DbP9bKsh X-Google-Smtp-Source: AGHT+IEDPlRMqulRIg3r8kW40I/SsGyRtN6utKONSve7LfxPlIdmjX9WNlyfMUZsarBvDlrygjQb X-Received: by 2002:a05:6214:c88:b0:696:14e6:9cd with SMTP id r8-20020a0562140c8800b0069614e609cdmr8334464qvr.23.1710894843584; Tue, 19 Mar 2024 17:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894843; cv=none; d=google.com; s=arc-20160816; b=ZI+GQ8ymwWK0wOLY0y7jYaUHGZFU794IUeMfIHpEAcGHnzjzruCqIOKSpkhpShseVw jzYVIlMgOa8TcaJe+hvgqTp5Q1rVK41p5EQvmX6fFkNAoil0pmhKnviLgkeaD9HeF57M iHxbndyMy7HmeKTrAzkEtowF2Su9m7zCZ3gnZkMrqN3zwen1ARsAK6ZELHb9EAep3O3b 6e3tz86q+gABbQ5192s2OiWVt58a/pVTS8tE70NmAnEha14b1oLcMTNzDhW7z1vpikZi HKvKNhtAjs1IDIPcbIc34tUuisswTxcwwZlCWbB7jnnH/xhNLUsuJFD2bOjgTo0dOI3D hfBA== 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=zJMpmIWK2dum6qCC+4K2slypl3etpIyoaJqh1QCO4fw=; fh=j6oUJOIe/HZ0oApVqODA+wb5Tv03Z1vlJlVjpDwxhHo=; b=ciJLQt0O/T2qQbufBiPFQNfcoZk7oob7V3tGsTki59kly1uUQnYkUS4d/gFEw8WG4I JfQgkpt7wKFmUxs0VrHhZ+5/E1iVCfAsXx3XlfBgtd8d4IIoXtLfpB/yEhzN9Y+gJOyn TQ/l38Dss3OXznZ+ISsKU2GijbS2FqMvSZiYfC7f0sGnOOKALQXk2JYOW6VEAs0+ro36 2RQPxuQ3+CxXU+5IMqInPazuKufcmPUqI/l6DF7ZncwfwZexVyWI+wjUB5AOjY5OfGEI nZbMJvTOCjeKfWUcd5PNY4xNUEXJi/cHESSvjLoU0Snx+x0YpuzpijEFKErpMFsN7lk/ L2ig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G2kDDZ3b; 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 kc13-20020a056214410d00b0068f6f28fe7bsi12014114qvb.541.2024.03.19.17.34.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:34:03 -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=G2kDDZ3b; 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 1rmjsj-00005s-RC; Tue, 19 Mar 2024 20:32:37 -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 1rmjsh-0008WV-Uc for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:35 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsg-0005XS-FM for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:35 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6e780830bdcso237683b3a.1 for ; Tue, 19 Mar 2024 17:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894753; x=1711499553; 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=zJMpmIWK2dum6qCC+4K2slypl3etpIyoaJqh1QCO4fw=; b=G2kDDZ3b4/wwumYWRsELKF0iV5J+KDRae70gJ5XLzWkkUvxIShFx3hezHVLNDyBux6 MHUHjzi9cEdfQQe2B1gmaxD0Ev5IAW/MkCDy/4FvurZsRDq8DP4Q1Ifk4GFCJDLlRRaD VmakxDpcvY9/q7W/TNJ3UvWAzg1m7BRAGV+pDM3T73R5XpgHa1qOdZPIaS6EVjpvlHUx ut1ZCLfvkaQNnfnGCO8vbub9S3ZQoodV9dU+TQo60vIgO3q7rnPQCslYIcSlM7BI4+pC njSag7Hj25t7bIEIBSs65Q7N37kg/iDrYXPZUBsQFB6LeJVcpk5FAGcdM1bHZEPS8Pp3 mtrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894753; x=1711499553; 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=zJMpmIWK2dum6qCC+4K2slypl3etpIyoaJqh1QCO4fw=; b=k0BAYbdQ4+Tlv000Hm3TVNcNR5oUaImfNM3OKH37GrrJn6xfK970Hw0yLC98Q23QY8 Vp4CH0jNSXzHW+Mt3Pb0ZaoelAePRjeSdlxJEoNOk+ILB4JzVKB9zYvSRwPe/B68xQJx vMlNRmjEMpTuzUnPQVKUUPNARmBm4IBnOlIsWx3QUh4vrUXAIzfZ7zeex9mzgiPHjUUD pb0u8sxlNwtTgw/iCxo4FOcgblBxw1pIze/blHVF6TV1lOr/Fl2TGfBH5ug8mVzGqbnp ljLhJcDUBQUuQm4DORHm1n1cljKWekTsrhPXkvx3VYTV0Cl3IiETpG+EeGbchRTZ66DH CdrQ== X-Gm-Message-State: AOJu0YzStt1lp+8CIbr+fw2rktp/H2z5I84bkTxouoEIFB7rxtKt4AFw PdCbxDZ3rEOnGWc3WsfEl587m6rGEL31oHK/tKuniT3CAf25tABIE63qYsXD1bjurFMhsGGrs2B q X-Received: by 2002:a05:6a20:3ca4:b0:1a3:5402:d5bd with SMTP id b36-20020a056a203ca400b001a35402d5bdmr1476982pzj.1.1710894753055; Tue, 19 Mar 2024 17:32:33 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle , Helge Deller Subject: [PULL 5/9] target/hppa: fix shrp for wide mode Date: Tue, 19 Mar 2024 14:32:19 -1000 Message-Id: <20240320003223.554145-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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 From: Sven Schnelle Fixes: f7b775a9c075 ("target/hppa: Implement SHRPD") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Reviewed-by: Helge Deller Message-Id: <20240319161921.487080-3-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 47c6db78c7..29ef061baf 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3512,7 +3512,7 @@ static bool trans_shrp_sar(DisasContext *ctx, arg_shrp_sar *a) /* Install the new nullification. */ cond_free(&ctx->null_cond); if (a->c) { - ctx->null_cond = do_sed_cond(ctx, a->c, false, dest); + ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest); } return nullify_end(ctx); } @@ -3555,7 +3555,7 @@ static bool trans_shrp_imm(DisasContext *ctx, arg_shrp_imm *a) /* Install the new nullification. */ cond_free(&ctx->null_cond); if (a->c) { - ctx->null_cond = do_sed_cond(ctx, a->c, false, dest); + ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest); } return nullify_end(ctx); } From patchwork Wed Mar 20 00:32:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781345 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65380wrj; Tue, 19 Mar 2024 17:33:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFU9syQJfILhLw5bFKWtuHqFK1xjpkYGk2QYp+ukkNHpyIMXRHJW9SJydKXseLDSv/CG9b3wD25lCGt0+SJP3b X-Google-Smtp-Source: AGHT+IEuavlc3VnkQhQOZDha7f9TMyaYBRBz8Cm96NpTbjo/1cJYWuI23J91muHFMM8bVSgFBZ3M X-Received: by 2002:a05:6808:124a:b0:3c1:ebff:8b93 with SMTP id o10-20020a056808124a00b003c1ebff8b93mr768855oiv.51.1710894808724; Tue, 19 Mar 2024 17:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894808; cv=none; d=google.com; s=arc-20160816; b=Yr7hCUbvvxuIcnaHHDRTfLuA0vWtbKBWf/bnKc2O0IN9PqYG/+W4si9O3wLbQDxT96 NxYqXjuHZILuiFz90NxMWLCzSt1Mqj0hg8Y/R+1laTn9zfmvj6M2OZIKvT38pNV9Dmq4 lgFSXeKVoS/us3zUmOTtWxg2qoYCkvZozvoXpnF7Kk0s6UXMu8ap0xhGLs/ObEbmDFAS vGhYw827mh9Is76sORzObJsxe/FNmaKFiHI4UI66C+VMaOeeatzAMnr/EXZZF+C3xJJq mlWv9DSjyKpJVjuFov7q6R17cmvpwGnwRqJUj+phXQp63nLqQ9cQnEc97l5ZiJB9nCNR uPOg== 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=xRQsRljrAfs8L69FUoxySpj8nUCWLZR7KoskL/j5Jqs=; fh=VrHP4sfoKA8I1LkS7u+zyL5sfQ9auI1Z6YYiaQiPlIc=; b=ZffOZsgSYdkfB7yGDjjZTUFkLer69aACjEi0U/OqkRrbamcCk3NJDTBOO3Nx59Iuu0 HaZofmG1t2L9Q78whxQieSUZlLw5XHCrYqliEdmjXhq7YGMnjoV5WVegqp1i/plZ8k39 fc5IIrEZhCreOw1rrtrlKERb8UepRMQ/Pza7wC4nsXSL+f4QZVIQoqDj/bICXsAOuEJh LjZjBUJxOYcgRvaBtlcVWyDqfN2WJn67Q9aDiu0/ewPDVLE/xSVYLzzY7oDf0mkRHP5V WxCEv+gjvQe7j99urRvTvB+MV47WK+mbIjaIK7XvnCzKrZN0JEcn+0FHNYKx3gEibKb+ XkQA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PGPBS1+1; 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 o8-20020ad45c88000000b00690dc94518esi11557028qvh.213.2024.03.19.17.33.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:33:28 -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=PGPBS1+1; 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 1rmjsl-00006Q-JQ; Tue, 19 Mar 2024 20:32:39 -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 1rmjsk-000063-1q for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:38 -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 1rmjsi-0005Xk-IT for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:37 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6e6bee809b8so5720898b3a.1 for ; Tue, 19 Mar 2024 17:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894754; x=1711499554; 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=xRQsRljrAfs8L69FUoxySpj8nUCWLZR7KoskL/j5Jqs=; b=PGPBS1+1a28Yc/D14I+babu+LGAA/dlv0FZWOX0lYEb8hwJzGN6IFwsyLDXL3aTP3R GsZMSCVaz27t+tds+nX0uh/KvwjvJiLvt85EcCuikmAWVLzp23bWMr2Vu9387n94a1sO g1q5EawV+x7NxqT9MAcx8jHnaVwAxMgunGHqTpdZ8490+2T4KD2v3LJA8qU338rjop9h InKuYDfHmGTCpM1ERD6nkMJEO8Nazj6okyxgFrec+KLmpN/j0ms4LPMexsPF0TnzrfEH YP9fd6KEUWogNbbPCZW1AE5xm+qPZierA62goYRLnqyfaflW2Oj4si5WdirReLzqtIgG NoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894754; x=1711499554; 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=xRQsRljrAfs8L69FUoxySpj8nUCWLZR7KoskL/j5Jqs=; b=ty6FGNDMO+59sOrFUMoFhacHNN6vaI5dJ7p6N+6KTpaIw1U4r54r80rCXoa9qey3Vs sfVuT3cnO1y30v41p86KXwiENINtnIqbr2tgMGxs/33sc4a0LWTPLKE1Mr+hKBIqs0iy zrmq16BuVi8BR0VfuJGSnbjM0XKwpwBnAEtWU8EE4OyJtHsBcSvvvhwikpUIxTNcO7VH mGS8U65QbZvdZrQ+XJj4xrkC3rvJ5htrvrcPH0pWZLQXybjYes2wEVNwrHp1hh6KS+pi jLKbhC1WKd58sd0ZTGckttUV0Xarbv4g/W0R2FmGEs5Dzey2av47/9WjaQH8STNfPGem nwbQ== X-Gm-Message-State: AOJu0Yyln6Af6jJ6zxDWvwebV5/S4tCwhwbyZsbOIPXb+kYl3fwepM2G N0JMTrf2meahwqLb2flvc9j4dRQL4HB6eCWoC4G/aUDMSTUL5IINkNmEZB7yhwU5p2ypPWs14Gv n X-Received: by 2002:a05:6a20:8418:b0:1a3:17f0:c4f3 with SMTP id c24-20020a056a20841800b001a317f0c4f3mr956260pzd.35.1710894754296; Tue, 19 Mar 2024 17:32:34 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle Subject: [PULL 6/9] target/hppa: fix access_id check Date: Tue, 19 Mar 2024 14:32:20 -1000 Message-Id: <20240320003223.554145-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 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, 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 From: Sven Schnelle PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240319161921.487080-4-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/mem_helper.c | 80 +++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 80f51e753f..84785b5a5c 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -152,6 +152,49 @@ static HPPATLBEntry *hppa_alloc_tlb_ent(CPUHPPAState *env) return ent; } +#define ACCESS_ID_MASK 0xffff + +/* Return the set of protections allowed by a PID match. */ +static int match_prot_id_1(uint32_t access_id, uint32_t prot_id) +{ + if (((access_id ^ (prot_id >> 1)) & ACCESS_ID_MASK) == 0) { + return (prot_id & 1 + ? PAGE_EXEC | PAGE_READ + : PAGE_EXEC | PAGE_READ | PAGE_WRITE); + } + return 0; +} + +static int match_prot_id32(CPUHPPAState *env, uint32_t access_id) +{ + int r, i; + + for (i = CR_PID1; i <= CR_PID4; ++i) { + r = match_prot_id_1(access_id, env->cr[i]); + if (r) { + return r; + } + } + return 0; +} + +static int match_prot_id64(CPUHPPAState *env, uint32_t access_id) +{ + int r, i; + + for (i = CR_PID1; i <= CR_PID4; ++i) { + r = match_prot_id_1(access_id, env->cr[i]); + if (r) { + return r; + } + r = match_prot_id_1(access_id, env->cr[i] >> 32); + if (r) { + return r; + } + } + return 0; +} + int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, int type, hwaddr *pphys, int *pprot, HPPATLBEntry **tlb_entry) @@ -224,29 +267,30 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx, break; } - /* access_id == 0 means public page and no check is performed */ - if (ent->access_id && MMU_IDX_TO_P(mmu_idx)) { - /* If bits [31:1] match, and bit 0 is set, suppress write. */ - int match = ent->access_id * 2 + 1; - - if (match == env->cr[CR_PID1] || match == env->cr[CR_PID2] || - match == env->cr[CR_PID3] || match == env->cr[CR_PID4]) { - prot &= PAGE_READ | PAGE_EXEC; - if (type == PAGE_WRITE) { - ret = EXCP_DMPI; - goto egress; - } - } - } - - /* No guest access type indicates a non-architectural access from - within QEMU. Bypass checks for access, D, B and T bits. */ + /* + * No guest access type indicates a non-architectural access from + * within QEMU. Bypass checks for access, D, B, P and T bits. + */ if (type == 0) { goto egress; } + /* access_id == 0 means public page and no check is performed */ + if (ent->access_id && MMU_IDX_TO_P(mmu_idx)) { + int access_prot = (hppa_is_pa20(env) + ? match_prot_id64(env, ent->access_id) + : match_prot_id32(env, ent->access_id)); + if (unlikely(!(type & access_prot))) { + /* Not allowed -- Inst/Data Memory Protection Id Fault. */ + ret = type & PAGE_EXEC ? EXCP_IMP : EXCP_DMPI; + goto egress; + } + /* Otherwise exclude permissions not allowed (i.e WD). */ + prot &= access_prot; + } + if (unlikely(!(prot & type))) { - /* The access isn't allowed -- Inst/Data Memory Protection Fault. */ + /* Not allowed -- Inst/Data Memory Access Rights Fault. */ ret = (type & PAGE_EXEC) ? EXCP_IMP : EXCP_DMAR; goto egress; } From patchwork Wed Mar 20 00:32:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781346 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65386wrj; Tue, 19 Mar 2024 17:33:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJyE9pLmq8heyCm662vhjrjEB5zvgU3pG616PS4es+Ho3CKouOA0BueFbOUHKjvHGgiFn+T3ccjmNTcxAXF/Fp X-Google-Smtp-Source: AGHT+IH7UeeVnhJNsSKNPL7bm96wm127QqRgSanxS6r+izvNx/dq1qTcFP7Hi+Q9Yos1t0rUfM00 X-Received: by 2002:a05:6830:344a:b0:6e6:8ef9:f2b9 with SMTP id b10-20020a056830344a00b006e68ef9f2b9mr646738otu.13.1710894811289; Tue, 19 Mar 2024 17:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894811; cv=none; d=google.com; s=arc-20160816; b=uxOdXHeFyS83SLLR2Qi948lWXcD7JTupVEKBMVbDhleJTmtEu4e3/sKwtA9Bb8wAfu FBpN7ePSZRQU1PZVwl97YG2vjgk0knnNt1qZjUNXtNG32fufAxEk5oRxPqgWt1HD5dxC zs7uQ0LjPCpItXDVOGpUl7BP/Gowh+L4HOPlT6DGY1UUOaAtRPEWmeyQ8yuFOMEX2hM9 Y+Jg1/JBeeyA4YgWTp+vdv0DOAPPkCZ+AdGFtjqmSWhwpEiYuwTPy99ym3Z4fxUVmYLx cKtiOjGNRbEPDa3z73X54h/YKm+Q1SkpeuAknlUEg/5tfxoTuE4GgBuENYSbV9RavV5N iZAQ== 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=mTE2FKSZqlvO2R4dKYXHZtvyEeZnXSdobAEuMGCaYVg=; fh=VrHP4sfoKA8I1LkS7u+zyL5sfQ9auI1Z6YYiaQiPlIc=; b=zFUfTaBVkVU/ybGybcy/NzdpHbbxHiJ4YFKmKOmMiABvpJyScH/o49yzNBuwSqZjQx Ku0t5UUdguBNQdzH+WQvdpYoEU+7k0NfOwJVgDNksYRF/G99gf0jEERCemPwr4YSlBwk tOXwnfuufM6wGEYsrWgzmoGCdCx3lvK7QifjK7mEOrWrki/OFbEIi6kqk5/CVUZCR2ur bCMzmhTXVR2UBOhE6AG+Y0xfH+J7r1aNOCB/1aehZ7yq9aUn0nkZFLUV5doUv3c5DWEd 5LSdXrM4qwdKdzVNHrGYwe24VzklGO+MRTy6j60AxkdNkaT7I6RBm+jcNbpGA4IqjtoR kCpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RyAZXhS5; 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 j4-20020a37ef04000000b00789f16ff95bsi7540601qkk.157.2024.03.19.17.33.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:33:31 -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=RyAZXhS5; 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 1rmjsm-00006h-79; Tue, 19 Mar 2024 20:32:40 -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 1rmjsk-00006F-F6 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:38 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsi-0005Xu-WF for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:38 -0400 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5ca29c131ebso3987028a12.0 for ; Tue, 19 Mar 2024 17:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894756; x=1711499556; 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=mTE2FKSZqlvO2R4dKYXHZtvyEeZnXSdobAEuMGCaYVg=; b=RyAZXhS59DKberbZor594y5tpuFrc5vkgRh7drDtREM9KiRjUrvflxk/hGyAnbStm+ o6gIK4KxsNsgVNVLdGgoPVIcWUiZxp99CXzRzQwyl3+NVhDTw/zqRBQZUju6iaahR+nG 1wCsRusLdMF1uZfrf3tLQRx+A/E4bLYqXTMo73tuIiRxUAD4AhPFrCcxyKPfi3+g/xjR mbL1WcTHoAfbKv4qEgWf4Nv3ZfvKeGiHbr0XOtNIFt5XAnKLbdycZoYzTSIIx063ICSi 7dPNGTtxShn+qn9f/rVdTIjRvvuuDZ4dX+dTOKTc7A2nNrsmpiCBieAuFj429lTusQeP qTuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894756; x=1711499556; 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=mTE2FKSZqlvO2R4dKYXHZtvyEeZnXSdobAEuMGCaYVg=; b=gtJJkLAVcWbgJb+tvu4hZpVFAvZseGbhXZsrDtOnNHVnf1yFeHuwwZX2d9QRnBrMId Yusp84jmp2OLbFYiS5PzWPFaoihNqoIGsFznJoXUfSYDP6I4LzPkdwtPrpanV1gVR/rb cvWFG1M/Efs+f7l/1pS6G8uqClWUA4LRGXT6ghLl5PhrndLvPsipDuzxJjQe2TSPL8Is qgA7PBS3Egc6MiDP+eCzzGgcq9YypkuEnlAivyXuoQqDdJhTvSWH7OVruMSXH1IxLZzo ebFshsYZN/C+N8BOmPZhgd8sRVZxApTNbh/y9ox7sHlkeeDDcfzU6IJUL+M3LbXV4Zt7 lYgA== X-Gm-Message-State: AOJu0YydOMWsin+K3aB5nTmPy6NvNeTQKhoxPH/YbD61iWJZw4NnVoZ8 4yJoakbmvFFgDncT8BRKrpjotySQyESdlwL0C0elmFQB3voxEJjyZP9wu09QV3swQ0mXubXGKxe n X-Received: by 2002:a05:6a20:748f:b0:1a3:6397:e253 with SMTP id p15-20020a056a20748f00b001a36397e253mr666510pzd.28.1710894755679; Tue, 19 Mar 2024 17:32:35 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle Subject: [PULL 7/9] target/hppa: exit tb on flush cache instructions Date: Tue, 19 Mar 2024 14:32:21 -1000 Message-Id: <20240320003223.554145-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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 From: Sven Schnelle When the guest modifies the tb it is currently executing from, it executes a fic instruction. Exit the tb on such instruction, otherwise we might execute stale code. Signed-off-by: Sven Schnelle Message-Id: <20240319161921.487080-5-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 6 +++--- target/hppa/translate.c | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index 5412ff9836..f58455dfdb 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -144,9 +144,9 @@ getshadowregs 1111 1111 1111 1101 1110 1010 1101 0010 nop 000001 ----- ----- -- 11001010 0 ----- # fdc, disp nop_addrx 000001 ..... ..... -- 01001010 . ----- @addrx # fdc, index nop_addrx 000001 ..... ..... -- 01001011 . ----- @addrx # fdce -nop_addrx 000001 ..... ..... --- 0001010 . ----- @addrx # fic 0x0a -nop_addrx 000001 ..... ..... -- 01001111 . 00000 @addrx # fic 0x4f -nop_addrx 000001 ..... ..... --- 0001011 . ----- @addrx # fice +fic 000001 ..... ..... --- 0001010 . ----- @addrx # fic 0x0a +fic 000001 ..... ..... -- 01001111 . 00000 @addrx # fic 0x4f +fic 000001 ..... ..... --- 0001011 . ----- @addrx # fice nop_addrx 000001 ..... ..... -- 01001110 . 00000 @addrx # pdc probe 000001 b:5 ri:5 sp:2 imm:1 100011 write:1 0 t:5 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 29ef061baf..107d7f1a85 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2343,6 +2343,13 @@ static bool trans_nop_addrx(DisasContext *ctx, arg_ldst *a) return true; } +static bool trans_fic(DisasContext *ctx, arg_ldst *a) +{ + /* End TB for flush instruction cache, so we pick up new insns. */ + ctx->base.is_jmp = DISAS_IAQ_N_STALE; + return trans_nop_addrx(ctx, a); +} + static bool trans_probe(DisasContext *ctx, arg_probe *a) { TCGv_i64 dest, ofs; From patchwork Wed Mar 20 00:32:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781344 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65379wrj; Tue, 19 Mar 2024 17:33:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBAhlis0OZdptn2jzzMQFI4oXqgmT8vZRzBZ8UaOMYPu/00HK7/Aj/9T4dxwv/KwFG3U/i2nAJP0PyFwiaspW7 X-Google-Smtp-Source: AGHT+IGs/RAsJhtDO3sXN0fTpFK0tzVZMVvvHiNDQiuVkoDj/9SNpw5gehZaWhLB8jXSYqX2eGkB X-Received: by 2002:a05:620a:4e8:b0:78a:21f3:cbd4 with SMTP id b8-20020a05620a04e800b0078a21f3cbd4mr255893qkh.30.1710894808591; Tue, 19 Mar 2024 17:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894808; cv=none; d=google.com; s=arc-20160816; b=EAsOu8BxukMtxy/3XrQpLlXMAZafEbtdJqrBN/zMGQJ+XfCJYgjQG8fjiC6wVEgh2V zNFaes3dR89NDNne87NvPJymqRN0lCjzpj7sQOR+hs70FMq3lj2GUl4XpJrGEVGlqO96 vpqf46B/xqwFzi34piGiNlVd6eU80Nuhk4eQdr8u+sjizdA3C5kDjGu/AXM4+EtNWkKI 7zTyrhDVemMWLMprIb5YDK23cGqlX2wVGNzdcZq1rIb0FiT2NRe8PvjmZ/HEOee1NB8s A/ihaIDgpKURaN/ue1krFM+aW+D+RFWezf8pzsDf6vj2MHxHZLW+9VdHrlDHds5oHx7f 2xCg== 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=cO2X5S7tqJGiWrlcfntAVFYIYWCP/fDIWBwAR5uSNVs=; fh=j6oUJOIe/HZ0oApVqODA+wb5Tv03Z1vlJlVjpDwxhHo=; b=ePjvj/c0eJNy5rhr6Mc5K8mMLrLmDFUVTPRaIyhIVUu0HUUUazbvhzVGv0Djh0Fb+f eODoD0fC+ZDQ8yIAfbH+B76oluWlMuo8OHnDo8uMDEyF6llVFe+T2F4jI/5qRGytMUlT qUIrV2n4fJrNfFaLa4Zd/PVHdinZU/CnCl4ng6xMzLYS5FRe0ibJHWj99ezWz10FEBua PUMcKDf7oUIFKCS0FEkXe5QnYM8NBbZcMSaIVoy15EmN/4MkO+0iRXZ5YA7qnrGKTBdC bOq94Yb2tslt2sUhofnJFRrxEuhUjrSFyCIAfcT90LGI2YznHYAfE0NvkpnvQyoXHSLx GnUg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ogt6z+as; 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 h3-20020a05620a21c300b0078a176b4fc8si1859182qka.262.2024.03.19.17.33.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:33:28 -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=ogt6z+as; 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 1rmjsn-00007D-OJ; Tue, 19 Mar 2024 20:32:41 -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 1rmjsm-000075-VD for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:40 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsk-0005YD-HT for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:39 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6e6cb0f782bso5317820b3a.1 for ; Tue, 19 Mar 2024 17:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894757; x=1711499557; 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=cO2X5S7tqJGiWrlcfntAVFYIYWCP/fDIWBwAR5uSNVs=; b=ogt6z+as5yO6mstuX90JGCEYjaqbCktLMtFl7yKSA6HrawJRWKJRdf+721vP0R7mMI cYwd8TejwbOg7E3uYY01cpv6CLvkHU1XeEzs5OQcBqDo+yFkTjL1EcfJNOAyT21ZL07u GDt0YNsLUHzcG40eVMe9JWLx6Wkr/GDekiJj7j85tOpgC0Tk6DK6MHbJOwA6PDIT5+uC eggiXFdqzUW4IoMl5oHrIgnjBJ94HA7+Y7V8pP+5DMG/LX0JJSuHmrZ5+9ZPECyozXAP vTW7NxCpF0DD6n8RDJawEH3owwHOb9V3mlDJaR4Z1QZqwleG2+O7R4MbZ+B/gzOYK9tu y1WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894757; x=1711499557; 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=cO2X5S7tqJGiWrlcfntAVFYIYWCP/fDIWBwAR5uSNVs=; b=B0V5uDI1llO6zhY09UI5A64SUUk1J39+WSV62yRozt5/ipdUjqX30mYaQGgHkJdtxH Co6AW93ia2Zq52X7GSWJReGJl8eTJ9BnZkogCGqfwMeQRMo49EPoukqAM9ME6JmP2NS6 olAxRUpcUD6u6VZnGkbsbuQOIEjKCeDn2MemJmGDXT8EkVhlWVyZTo9PamwieBioAySN Lb6alDMdhdaGJKrmECiRkm2XGN+8z8aiEDdMaJsmJWW+ZyArVboYDA1WyY7RQP8edRXn qoVvs1BzI7CjiZFN6DQrvpXK0Yod9PlFRu6bTvrJOjI1mK7s5PewDDh+OY6D5pUwnGC2 pmrA== X-Gm-Message-State: AOJu0YxM91ARbf7uRXj4aIzyotwa9AzqphC+O5ITeM5gaHFPvmVj3b98 ao0M3L+mq6QH9NQXZKK/j9dDbFsg+Rz5ZVR5ewCtKhHMs4cDIgbI7hrzePSC08PNQrq1eS87iJ8 L X-Received: by 2002:a05:6a20:9f4d:b0:1a3:5991:4845 with SMTP id ml13-20020a056a209f4d00b001a359914845mr798239pzb.38.1710894757118; Tue, 19 Mar 2024 17:32:37 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle , Helge Deller Subject: [PULL 8/9] target/hppa: mask privilege bits in mfia Date: Tue, 19 Mar 2024 14:32:22 -1000 Message-Id: <20240320003223.554145-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.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 From: Sven Schnelle mfia should return only the iaoq bits without privilege bits. Fixes: 98a9cb792c8 ("target-hppa: Implement system and memory-management insns") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Reviewed-by: Helge Deller Message-Id: <20240319161921.487080-6-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 107d7f1a85..19594f917e 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2011,7 +2011,7 @@ static bool trans_mfia(DisasContext *ctx, arg_mfia *a) { unsigned rt = a->t; TCGv_i64 tmp = dest_gpr(ctx, rt); - tcg_gen_movi_i64(tmp, ctx->iaoq_f); + tcg_gen_movi_i64(tmp, ctx->iaoq_f & ~3ULL); save_gpr(ctx, rt, tmp); cond_free(&ctx->null_cond); From patchwork Wed Mar 20 00:32:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 781348 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp65418wrj; Tue, 19 Mar 2024 17:33:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVTWBFb+hBIae7ECndhrXFYj58nXjXOOKgQAhCp0ZdrobcrlwSRzGU7Srf3WuPrqtY5LdnRrh/mrTvge8eqV7/b X-Google-Smtp-Source: AGHT+IGy/8hyu0tnA1XEV8Uag2im85XK6s3306f/62kd8q/6Nfd9965xO+1niItXK+G4DLdtYjy3 X-Received: by 2002:a05:620a:1467:b0:789:f58b:80af with SMTP id j7-20020a05620a146700b00789f58b80afmr8476847qkl.56.1710894819776; Tue, 19 Mar 2024 17:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710894819; cv=none; d=google.com; s=arc-20160816; b=vSoHcIL4EvXgrn9eXgN91DCes7amAKa8+LfQ4nnFaBi8P4cDiosds2PyvRnOej36T8 7R/qHDUkcVGLYBSaVkU02eZD1/PlgeTxrteMtPhtvvv1+t6S4frDANQsXKh6eLyooG5v TKs8BmHtO/usL9e9hqhi+wHKgYXRQ7TYZrH5ZS+9q5mK9F30PVSRNod5p9WBoN3KWp4F xTwpHvgs6S+dKpA53PIRNCDDJCvwzd5wIQ7tdq0w9OOaoDXNq7i0KhcSzWGgOmi69O/Y i7hlQsOYNP2MGqE8NuQoE7nu+p3eTa4yzuNwgSZwnXMC4VSp68dp6ZfKy9l6SewLUTSK 8ETw== 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=BhOWQohjArqAQE2458CrIktVxPOWZvRPD9t4+1OeJxA=; fh=VrHP4sfoKA8I1LkS7u+zyL5sfQ9auI1Z6YYiaQiPlIc=; b=Ui4l6JsFLnDdpcu76MVN1/UyLaFamQO5d2PLPA/vpne2zTWJE/TPFTDYP8Uv2hDUaj DuHWaf9WRXGIdoc4jAhDD55pnug867YHi7REAAfohZqwxeQvbsTjckvayp2o8y4RtvtR 5bukp+jwdqDP504Gzfvu22YRwpeZiTYiLFW578XbHU/vVKUfgma+g7M4n9ExLUljqqQc jSqFrPkWCFIaOof6Zr78l15lMvFHn2zMvQb+GeK5g85+ED2J5IPYoshy0jIqKh5tLNpk dGWM3t7ZnpdK69b5ea/IS+7L6fT8gOkYfqGd7yL4V6eLyuvBcsZrEbez1S9sqWPWsSYa Xh7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="N85ty/y/"; 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 u17-20020a05620a023100b0078a0366a2c9si4696333qkm.693.2024.03.19.17.33.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2024 17:33:39 -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="N85ty/y/"; 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 1rmjss-00008F-CR; Tue, 19 Mar 2024 20:32:46 -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 1rmjsq-00007s-C4 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:44 -0400 Received: from mail-oo1-xc2a.google.com ([2607:f8b0:4864:20::c2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmjsl-0005Ya-O5 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 20:32:44 -0400 Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-5a4817189c8so2641977eaf.1 for ; Tue, 19 Mar 2024 17:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710894758; x=1711499558; 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=BhOWQohjArqAQE2458CrIktVxPOWZvRPD9t4+1OeJxA=; b=N85ty/y/u6oN3Rd6/FxduBnywisHKLKODM2cqMrHHmVO65S1FU7QeP5Fb+t8oi0yiB +Mqp0tXVuGQAgxhpK079RAZDYo7E8VryP9uSFZFPst1SPM0u3RIxovjJCsD9KkRsjYj3 qdUe7U6u2pj4yLLFgjpLMIuHNlg/qzlN8657RfKQwKFbmJZUERXmcGAQOkFo/FfHjqVS BTvzh/JzWw7nDmAdh8/oeHE0e0iqlh79I7U/teBekhw99X30oiFkdC7JqMyuzSUWR0qL s13qBKJrC1VaE/8AHhQeoglkxsO+fW9eQM4BCDNRVcpDTGCw8yDOwP7t5moGlsDVO66U H1HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710894758; x=1711499558; 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=BhOWQohjArqAQE2458CrIktVxPOWZvRPD9t4+1OeJxA=; b=pT/YZ2oeQtV4FMdtG0/O79mhEl6kntWliA/GwbbibRjcNvZxNFV54rQ/C67o3SuXY1 FwKcMpMxEzYNjreFfiPUiO8Xt9+OqSST3P7GSRRKbcMttwY/0HbYsp29E2sNtO4Fhiwp SG6gSF2OGXjork6ksZoQKPZwqVkR/aHbJELFl15qsuxD2+viAD5WrriTmX7ufdsayy1a kl1mJ6Sf7CP4nOl1RfN3w+1dduZDY5Np9o5dUZUn4PNb7P8BqHsGX86GSGoIoPQ2GTUu K06pyUDJyzXlb20/J1MbNyCMrZpkut4YByxrJ+3gl97i5aGNFyUfFRkQwXoP6mJvSHhi pIhg== X-Gm-Message-State: AOJu0YygYLm2BShxXvZCX0HLF/oaAvO97JxWkcoz4c/AXlLD19Q4rnfZ Ck1X+PlEe5YS+LMsQtEcplJAurMnNGGyuVmgcc+l6SjZlhGmMCUW287grKLIgvfJ4fjNQPphO+0 Z X-Received: by 2002:a05:6820:2018:b0:5a4:d7df:9233 with SMTP id by24-20020a056820201800b005a4d7df9233mr4038772oob.2.1710894758554; Tue, 19 Mar 2024 17:32:38 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d19-20020a63d653000000b005d553239b16sm8475645pgj.20.2024.03.19.17.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:32:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Sven Schnelle Subject: [PULL 9/9] target/hppa: fix do_stdby_e() Date: Tue, 19 Mar 2024 14:32:23 -1000 Message-Id: <20240320003223.554145-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320003223.554145-1-richard.henderson@linaro.org> References: <20240320003223.554145-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c2a; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc2a.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 From: Sven Schnelle stdby,e,m was writing data from the wrong half of the register into memory for cases 0-3. Fixes: 25460fc5a71 ("target/hppa: Implement STDBY") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Message-Id: <20240319161921.487080-7-svens@stackframe.org> Signed-off-by: Richard Henderson --- target/hppa/op_helper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 480fe80844..6cf49f33b7 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -281,17 +281,17 @@ static void do_stdby_e(CPUHPPAState *env, target_ulong addr, uint64_t val, case 3: /* The 3 byte store must appear atomic. */ if (parallel) { - atomic_store_mask32(env, addr - 3, val, 0xffffff00u, ra); + atomic_store_mask32(env, addr - 3, val >> 32, 0xffffff00u, ra); } else { - cpu_stw_data_ra(env, addr - 3, val >> 16, ra); - cpu_stb_data_ra(env, addr - 1, val >> 8, ra); + cpu_stw_data_ra(env, addr - 3, val >> 48, ra); + cpu_stb_data_ra(env, addr - 1, val >> 40, ra); } break; case 2: - cpu_stw_data_ra(env, addr - 2, val >> 16, ra); + cpu_stw_data_ra(env, addr - 2, val >> 48, ra); break; case 1: - cpu_stb_data_ra(env, addr - 1, val >> 24, ra); + cpu_stb_data_ra(env, addr - 1, val >> 56, ra); break; default: /* Nothing is stored, but protection is checked and the