]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/MPLAB/PIC24_dsPIC/portasm_PIC24.S
Replace the CLZ function with a CLZ intrinsic in the Cortex-R4 port layer.
[freertos] / FreeRTOS / Source / portable / MPLAB / PIC24_dsPIC / portasm_PIC24.S
index 5fec0222bb3f21ba74997761a92d7371c36b6f2a..84926f1aa5b7e96d8193652bd9a78572079d7297 100644 (file)
@@ -1,7 +1,7 @@
 /*\r
     FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
 \r
-    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT \r
+    FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\r
     http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 \r
     ***************************************************************************\r
@@ -42,7 +42,7 @@
     FreeRTOS WEB site.\r
 \r
     1 tab == 4 spaces!\r
-    \r
+\r
     ***************************************************************************\r
      *                                                                       *\r
      *    Having a problem?  Start by reading the FAQ "My application does   *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
-    \r
-    http://www.FreeRTOS.org - Documentation, training, latest versions, license \r
-    and contact details.  \r
-    \r
+\r
+    http://www.FreeRTOS.org - Documentation, training, latest versions, license\r
+    and contact details.\r
+\r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool.\r
 \r
-    Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell \r
-    the code with commercial support, indemnification, and middleware, under \r
+    Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell\r
+    the code with commercial support, indemnification, and middleware, under\r
     the OpenRTOS brand: http://www.OpenRTOS.com.  High Integrity Systems also\r
-    provide a safety engineered and independently SIL3 certified version under \r
+    provide a safety engineered and independently SIL3 certified version under\r
     the SafeRTOS brand: http://www.SafeRTOS.com.\r
 */\r
 \r
@@ -86,9 +86,14 @@ _vPortYield:
                PUSH    W14\r
                PUSH    RCOUNT\r
                PUSH    TBLPAG\r
-                                                                                                                                                                               \r
+\r
                PUSH    CORCON\r
-               PUSH    PSVPAG\r
+               #ifdef __HAS_EDS__\r
+                       PUSH    DSRPAG\r
+                       PUSH    DSWPAG\r
+               #else\r
+                       PUSH    PSVPAG\r
+               #endif /* __HAS_EDS__ */\r
                MOV             _uxCriticalNesting, W0          /* Save the critical nesting counter for the task. */\r
                PUSH    W0\r
                MOV             _pxCurrentTCB, W0                       /* Save the new top of stack into the TCB. */\r
@@ -100,7 +105,12 @@ _vPortYield:
                MOV             [W0], W15\r
                POP             W0                                                      /* Restore the critical nesting counter for the task. */\r
                MOV             W0, _uxCriticalNesting\r
+#ifdef __HAS_EDS__\r
+        POP     DSWPAG\r
+        POP     DSRPAG\r
+#else\r
                POP             PSVPAG\r
+#endif /* __HAS_EDS__ */\r
                POP             CORCON\r
                POP             TBLPAG\r
                POP             RCOUNT                                          /* Restore the registers from the stack. */\r