[Bug 217611] ARM VFP/NEON regs not preserved in signal delivery

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Mar 7 13:21:24 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217611

            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 at FreeBSD.org
          Reporter: andrew at tao11.riddles.org.uk

Created attachment 180600
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180600&action=edit
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 RPI2
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=10000000.000000 expected=10000000.000000
h1: actual=10000001.000000 expected=10000001.000000
h2: actual=10000002.000000 expected=10000002.000000
h3: actual=10000003.000000 expected=10000003.000000
h4: actual=10000004.000000 expected=10000004.000000
h5: actual=10000005.000000 expected=10000005.000000
h6: actual=10000006.000000 expected=10000006.000000
h7: actual=10000007.000000 expected=10000007.000000

./fptst breakme
entering...
h0: actual=-18199474333245.414062 expected=10000000.000000
h1: actual=-18199474333245.414062 expected=10000001.000000
h2: actual=-18199476796269.414062 expected=10000002.000000
h3: actual=-18199476796271.312500 expected=10000003.000000
h4: actual=-18199479259296.312500 expected=10000004.000000
h5: actual=-18199479259295.312500 expected=10000005.000000
h6: actual=-18199481722320.312500 expected=10000006.000000
h7: actual=-18199481722319.312500 expected=10000007.000000

(actual results will vary)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list