diff options
author | Mike Pall <mike> | 2013-02-24 12:41:53 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2013-02-24 12:41:53 +0100 |
commit | 9b7d2e92769c0382e1615e4e764c177acce10103 (patch) | |
tree | b087952d518b0938139aee6aea052278c0c5197a /src | |
parent | d4bc6ab756371b744f3e0030d5cf0b24bffdf24c (diff) | |
download | luajit-9b7d2e92769c0382e1615e4e764c177acce10103.tar.gz luajit-9b7d2e92769c0382e1615e4e764c177acce10103.tar.bz2 luajit-9b7d2e92769c0382e1615e4e764c177acce10103.zip |
Properly fix MSVC intrinsics for older versions.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_def.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_def.h b/src/lj_def.h index 9a22e3bd..83eb67bc 100644 --- a/src/lj_def.h +++ b/src/lj_def.h | |||
@@ -243,17 +243,17 @@ static LJ_AINLINE uint32_t lj_getu32(const void *p) | |||
243 | #endif | 243 | #endif |
244 | 244 | ||
245 | #ifdef _M_PPC | 245 | #ifdef _M_PPC |
246 | #pragma intrinsic(_CountLeadingZeros) | ||
247 | unsigned int _CountLeadingZeros(long); | 246 | unsigned int _CountLeadingZeros(long); |
247 | #pragma intrinsic(_CountLeadingZeros) | ||
248 | static LJ_AINLINE uint32_t lj_fls(uint32_t x) | 248 | static LJ_AINLINE uint32_t lj_fls(uint32_t x) |
249 | { | 249 | { |
250 | return _CountLeadingZeros(x) ^ 31; | 250 | return _CountLeadingZeros(x) ^ 31; |
251 | } | 251 | } |
252 | #else | 252 | #else |
253 | #pragma intrinsic(_BitScanForward) | ||
254 | #pragma intrinsic(_BitScanReverse) | ||
255 | unsigned char _BitScanForward(uint32_t *, unsigned long); | 253 | unsigned char _BitScanForward(uint32_t *, unsigned long); |
256 | unsigned char _BitScanReverse(uint32_t *, unsigned long); | 254 | unsigned char _BitScanReverse(uint32_t *, unsigned long); |
255 | #pragma intrinsic(_BitScanForward) | ||
256 | #pragma intrinsic(_BitScanReverse) | ||
257 | 257 | ||
258 | static LJ_AINLINE uint32_t lj_ffs(uint32_t x) | 258 | static LJ_AINLINE uint32_t lj_ffs(uint32_t x) |
259 | { | 259 | { |