RE: [arm-gnu] Illegal VFP instruction generated in thumb2 mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [arm-gnu] Illegal VFP instruction generated in thumb2 mode



Probably you are missing this patch.

________________________________
From: Bob.Vandette@xxxxxxx [mailto:Bob.Vandette@xxxxxxx]
Sent: Wednesday, February 11, 2009 4:09 PM
To: Woodruff, Richard
Cc: arm-gnu@xxxxxxxxxxxxxxxx; Daniel Jacobowitz
Subject: Re: [arm-gnu] Illegal VFP instruction generated in thumb2 mode

On 02/11/09 04:56 PM, Woodruff, Richard wrote:

What kernel version and hardware are you running on?



The older ARM kernels didn't properly enable coprocessor access.



BTW, You expect to get a undef exception on first use for a process.  The kernel then sorts out if you have vfp hardware and turns it on.  However, as I said on earlier kernels some steps were missing.  I've used neon/vfp on our cortexA8 with out any difficult issues.




I'm running a 2.6.25 kernel.

A non-thumb cortex-a8 vfp binary works just fine on this system.
I only see this problem when I add -mthumb on the compile line.

I suppose it's possible that the kernel instruction decoder can't handle
the fault when it comes from a process running in thumb mode.

Maybe I'll try adding some non thumb float code in my startup sequence.

Bob.



Regards,

Richard W.





-----Original Message-----

From: Daniel Jacobowitz [mailto:dan@xxxxxxxxxxxxxxxx]

Sent: Wednesday, February 11, 2009 3:47 PM

To: Bob Vandette

Cc: arm-gnu@xxxxxxxxxxxxxxxx<mailto:arm-gnu@xxxxxxxxxxxxxxxx>

Subject: Re: [arm-gnu] Illegal VFP instruction generated in thumb2 mode



On Wed, Feb 11, 2009 at 04:41:50PM -0500, Bob Vandette wrote:



The offending instruction is this:



fmsr    s15, r4



I didn't think s15 was supported register for this instruction in any

mode (ARM or Thumb)?





Yes, this is valid in both ARM and Thumb-2 mode.  fmsr moves between

any core register and any single-precision VFP register.





That's not what my Cortex-a8 technical reference states.



Unless I'm reading it wrong, the fmsr instruction is an alias for the

vmov instruction.

The vmov instruction prohibits register 15 from being used in any mode and

register 13 from being used in thumb mode.



That's <Rt>, so it's r13 [sp] and r15 [pc]; there are no restrictions

on <Sn>.



--

Daniel Jacobowitz

CodeSourcery







Attachment: armv7-thumb2-vfp.patch
Description: armv7-thumb2-vfp.patch