]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/MSVC-MingW/portmacro.h
MSP430:
[freertos] / FreeRTOS / Source / portable / MSVC-MingW / portmacro.h
index 4ba72918313d1bc8f6c9e4e7f29ec6d9248547b7..6ed948d7361d6107bc1b043fd5acbb3cdcf4767f 100644 (file)
@@ -152,11 +152,9 @@ void vPortExitCritical( void );
        /*-----------------------------------------------------------*/\r
 \r
        #ifdef __GNUC__\r
-               #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities )      \\r
-                       __asm volatile( "mov %0, %%eax                                                                  \n\t" \\r
-                                                       "bsr %%eax, %%eax                                                               \n\t" \\r
-                                                       "mov %%eax, %1                                                                  \n\t" \\r
-                                                       :"=r"(uxTopPriority) : "r"(uxReadyPriorities) : "eax" )\r
+               #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities )    \\r
+                       __asm volatile( "bsr %1, %0\n\t"                                                                        \\r
+                                                       :"=r"(uxTopPriority) : "rm"(uxReadyPriorities) : "cc" )\r
        #else\r
                /* BitScanReverse returns the bit position of the most significant '1'\r
                in the word. */\r