From patchwork Thu Apr 25 21:59:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ring <1701835@bugs.launchpad.net> X-Patchwork-Id: 1091097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bugs.launchpad.net Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44qrsv30Jwz9s00 for ; Fri, 26 Apr 2019 08:08:15 +1000 (AEST) Received: from localhost ([127.0.0.1]:35704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJmXM-0000d1-29 for incoming@patchwork.ozlabs.org; Thu, 25 Apr 2019 18:08:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJmWg-0000cP-EP for qemu-devel@nongnu.org; Thu, 25 Apr 2019 18:07:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJmUv-0000iC-4Q for qemu-devel@nongnu.org; Thu, 25 Apr 2019 18:05:42 -0400 Received: from indium.canonical.com ([91.189.90.7]:60260) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJmUt-0000fU-P7 for qemu-devel@nongnu.org; Thu, 25 Apr 2019 18:05:41 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1hJmUr-00007d-9z for ; Thu, 25 Apr 2019 22:05:37 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 4A5FA2E80C9 for ; Thu, 25 Apr 2019 22:05:37 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 25 Apr 2019 21:59:53 -0000 From: Stefan Ring <1701835@bugs.launchpad.net> To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: bruno-clisp rth stefanrin th-huth X-Launchpad-Bug-Reporter: Bruno Haible (bruno-clisp) X-Launchpad-Bug-Modifier: Stefan Ring (stefanrin) References: <149893001258.15852.11258418521313176097.malonedeb@wampee.canonical.com> Message-Id: <155622959330.14126.13092327258668683533.malone@gac.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="18928"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: f501a4c8bf2f53adc0d8ad3260ca23743e751118 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.189.90.7 Subject: [Qemu-devel] [Bug 1701835] Re: floating-point operation bugs in qemu-alpha X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1701835 <1701835@bugs.launchpad.net> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" There seems to be more confusion of the sort. This fixes it for me: But I would consider this a workaround at best. Having a right-shifted mask in the first place seems rather unhelpful to me. --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -10226,7 +10226,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return -TARGET_EFAULT; } orig_fpcr = cpu_alpha_load_fpcr(cpu_env); - fpcr = orig_fpcr & FPCR_DYN_MASK; + fpcr = orig_fpcr & ((uint64_t) FPCR_DYN_MASK << 32); /* Copied from linux ieee_swcr_to_fpcr. */ fpcr |= (swcr & SWCR_STATUS_MASK) << 35;