linux/arch/arm/vfp
Russell King 5e4ba617c1 ARM: VFP: fix emulation of second VFP instruction
Martin Storsjö reports that the sequence:

        ee312ac1        vsub.f32        s4, s3, s2
        ee702ac0        vsub.f32        s5, s1, s0
        e59f0028        ldr             r0, [pc, #40]
        ee111a90        vmov            r1, s3

on Raspberry Pi (implementor 41 architecture 1 part 20 variant b rev 5)
where s3 is a denormal and s2 is zero results in incorrect behaviour -
the instruction "vsub.f32 s5, s1, s0" is not executed:

        VFP: bounce: trigger ee111a90 fpexc d0000780
        VFP: emulate: INST=0xee312ac1 SCR=0x00000000
        ...

As we can see, the instruction triggering the exception is the "vmov"
instruction, and we emulate the "vsub.f32 s4, s3, s2" but fail to
properly take account of the FPEXC_FP2V flag in FPEXC.  This is because
the test for the second instruction register being valid is bogus, and
will always skip emulation of the second instruction.

Cc: <stable@vger.kernel.org>
Reported-by: Martin Storsjö <martin@martin.st>
Tested-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-02-25 16:09:12 +00:00
..
entry.S ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone 2013-01-16 16:51:10 +00:00
Makefile ARM: vfp: use -mfloat-abi=soft to build vfp 2011-10-01 21:08:55 +02:00
vfp.h [ARM] 5387/1: Add ptrace VFP support on ARM 2009-02-12 10:59:43 +00:00
vfpdouble.c [ARM] vfp: fix fuitod/fsitod instructions 2008-01-10 17:07:08 +00:00
vfphw.S ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone 2013-01-16 16:51:10 +00:00
vfpinstr.h [ARM] 4583/1: ARMv7: Add VFPv3 support 2008-01-26 14:41:28 +00:00
vfpmodule.c ARM: VFP: fix emulation of second VFP instruction 2013-02-25 16:09:12 +00:00
vfpsingle.c [ARM] Remove unnecessary asm/ptrace.h from VFP support code 2007-04-22 10:56:40 +01:00