From owner-freebsd-arm@freebsd.org Tue Mar 7 13:21:24 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 933F9D00783 for ; Tue, 7 Mar 2017 13:21:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 691001DB1 for ; Tue, 7 Mar 2017 13:21:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v27DLOTx055897 for ; Tue, 7 Mar 2017 13:21:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 217611] ARM VFP/NEON regs not preserved in signal delivery Date: Tue, 07 Mar 2017 13:21:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: andrew@tao11.riddles.org.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 13:21:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217611 Bug ID: 217611 Summary: ARM VFP/NEON regs not preserved in signal delivery Product: Base System Version: 11.0-STABLE Hardware: arm OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: andrew@tao11.riddles.org.uk Created attachment 180600 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D180600&action= =3Dedit FP registers vs. signals Signal delivery to process is not saving/restoring the VFP/NEON registers. I found this on stable/11, but it also exists on CURRENT. I tested on an RP= I2 but the problem clearly exists on other ARM platforms. The bug is obvious by inspection, but I attach an example test program. (If= you try this on a much faster platform than cortex-a7 @900MHz, make sure you increase the loop count to ensure runtime exceeds 1 second.) cc fptst.c -o fptst ./fptst entering... h0: actual=3D10000000.000000 expected=3D10000000.000000 h1: actual=3D10000001.000000 expected=3D10000001.000000 h2: actual=3D10000002.000000 expected=3D10000002.000000 h3: actual=3D10000003.000000 expected=3D10000003.000000 h4: actual=3D10000004.000000 expected=3D10000004.000000 h5: actual=3D10000005.000000 expected=3D10000005.000000 h6: actual=3D10000006.000000 expected=3D10000006.000000 h7: actual=3D10000007.000000 expected=3D10000007.000000 ./fptst breakme entering... h0: actual=3D-18199474333245.414062 expected=3D10000000.000000 h1: actual=3D-18199474333245.414062 expected=3D10000001.000000 h2: actual=3D-18199476796269.414062 expected=3D10000002.000000 h3: actual=3D-18199476796271.312500 expected=3D10000003.000000 h4: actual=3D-18199479259296.312500 expected=3D10000004.000000 h5: actual=3D-18199479259295.312500 expected=3D10000005.000000 h6: actual=3D-18199481722320.312500 expected=3D10000006.000000 h7: actual=3D-18199481722319.312500 expected=3D10000007.000000 (actual results will vary) --=20 You are receiving this mail because: You are the assignee for the bug.=