From e7674a2c26a3db26e3019f3c6ee94c9ea88d5a3c Mon Sep 17 00:00:00 2001
From: Sudarshan Rajagopalan <sudarshan.rajagopalan@vecna.com>
Date: Thu, 27 Aug 2015 14:19:24 -0400
Subject: [PATCH] Fix exception handler for supporting FPU

---
 cpukit/score/cpu/arm/armv7m-exception-default.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cpukit/score/cpu/arm/armv7m-exception-default.c b/cpukit/score/cpu/arm/armv7m-exception-default.c
index e890cdf..2ddc6fc 100644
--- a/cpukit/score/cpu/arm/armv7m-exception-default.c
+++ b/cpukit/score/cpu/arm/armv7m-exception-default.c
@@ -28,10 +28,10 @@ void __attribute__((naked)) _ARMV7M_Exception_default( void )
     "mov r2, lr\n"
     "mrs r1, msp\n"
     "mrs r0, psp\n"
-    "cmn r2, #3\n"
-    "itt ne\n"
-    "movne r0, r1\n"
-    "addne r0, %[cpufsz]\n"
+    "tst lr, #4\n"
+    "itt eq\n"
+    "moveq r0, r1\n"
+    "addeq r0, %[cpufsz]\n"
     "add r2, r0, %[v7mlroff]\n"
     "add r1, sp, %[cpulroff]\n"
     "ldm r2, {r3-r5}\n"
-- 
1.9.1

