X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FMSVC-MingW%2Fportmacro.h;h=6ed948d7361d6107bc1b043fd5acbb3cdcf4767f;hb=7c636ea0623ed5d65ecd33e8df65401604ea7100;hp=4ba72918313d1bc8f6c9e4e7f29ec6d9248547b7;hpb=62c041d220c4812a1ea4350cac687998fcd5d733;p=freertos diff --git a/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h b/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h index 4ba729183..6ed948d73 100644 --- a/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h +++ b/FreeRTOS/Source/portable/MSVC-MingW/portmacro.h @@ -152,11 +152,9 @@ void vPortExitCritical( void ); /*-----------------------------------------------------------*/ #ifdef __GNUC__ - #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) \ - __asm volatile( "mov %0, %%eax \n\t" \ - "bsr %%eax, %%eax \n\t" \ - "mov %%eax, %1 \n\t" \ - :"=r"(uxTopPriority) : "r"(uxReadyPriorities) : "eax" ) + #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) \ + __asm volatile( "bsr %1, %0\n\t" \ + :"=r"(uxTopPriority) : "rm"(uxReadyPriorities) : "cc" ) #else /* BitScanReverse returns the bit position of the most significant '1' in the word. */