Shouldn't use SIGILL to detect NEON

Bug #535054 reported by Loïc Minier
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
x264 (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: x264

Hey

x264 currently uses SIGILL to test for support of NEON (and other features, on non-armel arch too); according to Dave Martin we need to disable the the "fast NEON MRC" test as
"""
this performance counter based test may not be safe across all platforms, and won't reliably give the right answer even where it doesn't SIGILL— it also requires a patched kernel; so we probably don't want it enabled in Ubuntu (unless we can use some other decision route like identifying the CPU from the contents of /proc/cpuinfo. I haven't attempted this for now.)
"""

see bug #388388 and bug #524859 (comments 6 and 7); patches:
http://launchpadlibrarian.net/39623773/x264-enable-neon-runtime-detection.diff
http://launchpadlibrarian.net/39623809/x264-rules.diff

Thanks,

Revision history for this message
Loïc Minier (lool) wrote :

Also, IIRC, SIGILL isn't thread safe.

Changed in x264 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Loïc Minier (lool) wrote :

The patches might have to be rebased on top of the latest x264 package; they should also be discussed with upstream.

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

Also worth commenting that SIGILL detection will give the wrong result on iMX51 when the kernel tries to report NEON as absent but the hardware has it; and also the test is unreliable where the hardware has NEON but the kernel was built with CONFIG_NEON=n.

So, lots of reasons...

IIRC, the above patches applied against upstream at the time they were developed.

Steve Langasek (vorlon)
tags: added: arm-porting-queue
Tobin Davis (gruemaster)
tags: added: bitesize
Revision history for this message
Oibaf (oibaf) wrote :

It looks this code changed a lot since 2010. Is this still an issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.