From patchwork Tue Jan 29 19:14:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 10787091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5CDE13BF for ; Tue, 29 Jan 2019 19:15:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4D0B2CF9D for ; Tue, 29 Jan 2019 19:15:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A65172D019; Tue, 29 Jan 2019 19:15:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B5A672CF9D for ; Tue, 29 Jan 2019 19:15:57 +0000 (UTC) Received: from localhost ([127.0.0.1]:54262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goYrR-0004la-4h for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 Jan 2019 14:15:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goYqM-00045F-00 for qemu-devel@nongnu.org; Tue, 29 Jan 2019 14:14:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goYqL-00079R-5C for qemu-devel@nongnu.org; Tue, 29 Jan 2019 14:14:45 -0500 Received: from smtp.duncanthrax.net ([2001:470:70c5:1111::170]:52218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goYqK-00074c-MX for qemu-devel@nongnu.org; Tue, 29 Jan 2019 14:14:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=duncanthrax.net; s=dkim; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From; bh=nXyYI2urVckHvf+u/ApxKDQuG8PU2R9BojQybP9HEzg=; b=cWNsYGtB7JEvwGt3a5DLzYwzjD I+sxgsEQQ+QWNQ/SfcicLzUhVwcR2U0JagH34F5kB4Oua3MynQCHAnlzk1qG1Ejg2RLFwLGjaJUGN vCByW5TqU2Ea2nWcQVLrlDOEstd/DwWLatDqK6LvKUQqgg/csylIKjJ4j2TBt8G1Av4Q=; Received: from hsi-kbw-109-193-150-175.hsi7.kabel-badenwuerttemberg.de ([109.193.150.175] helo=t470p.stackframe.org) by smtp.eurescom.eu with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1goYpq-00032i-Kp; Tue, 29 Jan 2019 20:14:14 +0100 From: Sven Schnelle To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2019 20:14:02 +0100 Message-Id: <20190129191402.29539-1-svens@stackframe.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:70c5:1111::170 Subject: [Qemu-devel] [PATCH] target/hppa: fix PSW Q bit behaviour to match hardware X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: deller@gmx.de, Sven Schnelle , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP PA-RISC specification says: "Setting the PSW Q-bit, PSW{28}, to 1 with this instruction, if it was not already 1, is an undefined operation." However, at least HP-UX 10.20 sets the Q bit from 0 to 1 with the SSM instruction. Tested this both on HP9000/712 and HP9000/785/C3750, both machines set the Q bit from 0 to 1 without exception. This makes HP-UX 10.20 progress a little bit further. Signed-off-by: Sven Schnelle --- target/hppa/op_helper.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 912e8d5be4..3adcfd8976 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -665,11 +665,6 @@ void HELPER(reset)(CPUHPPAState *env) target_ureg HELPER(swap_system_mask)(CPUHPPAState *env, target_ureg nsm) { target_ulong psw = env->psw; - /* ??? On second reading this condition simply seems - to be undefined rather than a diagnosed trap. */ - if (nsm & ~psw & PSW_Q) { - hppa_dynamic_excp(env, EXCP_ILL, GETPC()); - } env->psw = (psw & ~PSW_SM) | (nsm & PSW_SM); return psw & PSW_SM; }