浏览代码

Allow using MSVC intrinsics with older versions.

Mike Pall 12 年之前
父节点
当前提交
fb101458c5
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/lj_def.h

+ 2 - 0
src/lj_def.h

@@ -242,6 +242,8 @@ static LJ_AINLINE uint32_t lj_getu32(const void *p)
 #define LJ_FASTCALL	__fastcall
 #endif
 
+#pragma intrinsic(_BitScanForward)
+#pragma intrinsic(_BitScanReverse)
 unsigned char _BitScanForward(uint32_t *, unsigned long);
 unsigned char _BitScanReverse(uint32_t *, unsigned long);
 unsigned long _byteswap_ulong(unsigned long);