Bug 70501

Summary: incorrect emulation of VFP multiply accumulate instructions
Product: Platform Specific/Hardware Reporter: Jay Foad (jay.foad)
Component: ARMAssignee: linux-arm-kernel (linux-arm-kernel)
Status: NEW ---    
Severity: normal CC: alan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.6.11+ #538 PREEMPT Subsystem:
Regression: No Bisected commit-id:
Attachments: test case
proposed fix
fixed test case

Description Jay Foad 2014-02-13 12:41:49 UTC
Created attachment 125901 [details]
test case

With the attached test case I get:

$ gcc -o mac mac.c && ./mac
4.99997e-41
4.99994e-321

It should print (approximately) 1e-40 and 1e-320, so these results are too small by a factor of two.

I'm doing this on a Raspberry Pi with an old-ish kernel, but I believe the bug is still present in later kernel versions.
Comment 1 Jay Foad 2014-02-13 12:43:22 UTC
Created attachment 125911 [details]
proposed fix
Comment 2 Jay Foad 2014-02-13 13:07:44 UTC
Created attachment 125921 [details]
fixed test case