Skip to content

Commit 66749ac

Browse files
committed
[MSVC-MingW] Include correct header for compiler intrinsics
1 parent b27722a commit 66749ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

portable/MSVC-MingW/portmacro.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ void vPortExitCritical( void );
145145
: "cc" )
146146

147147
#else /* __GNUC__ */
148+
#include <intrin.h>
148149

149150
/* BitScanReverse returns the bit position of the most significant '1'
150151
* in the word. */
151152
#if defined( __x86_64__ ) || defined( _M_X64 )
153+
#pragma intrinsic(_BitScanReverse64)
152154

153155
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) \
154156
do \
@@ -159,6 +161,7 @@ void vPortExitCritical( void );
159161
} while( 0 )
160162

161163
#else /* #if defined( __x86_64__ ) || defined( _M_X64 ) */
164+
#pragma intrinsic(_BitScanReverse)
162165

163166
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) _BitScanReverse( ( DWORD * ) &( uxTopPriority ), ( uxReadyPriorities ) )
164167

0 commit comments

Comments
 (0)