diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-06-01 01:50:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-09 22:29:04 +0000 |
commit | 55232ad01e1a0a44aabda3d3aeb4764a9ecae822 (patch) | |
tree | e28d16399ddd1fad4248890d906e827f70979624 /src/qcommon | |
parent | 11157ad2f337649f118811bd9122591577240aa1 (diff) |
Fix is*() functions for windows where long value is 4 bytes
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/vm_x86_64_assembler.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qcommon/vm_x86_64_assembler.c b/src/qcommon/vm_x86_64_assembler.c index 5047977a..ad2aeea5 100644 --- a/src/qcommon/vm_x86_64_assembler.c +++ b/src/qcommon/vm_x86_64_assembler.c @@ -345,32 +345,32 @@ static const char* argtype2str(argtype_t t) static inline int iss8(int64_t v) { - return (v >= -0x80 && v <= 0x7f); + return (SCHAR_MIN <= v && v <= SCHAR_MAX); } static inline int isu8(u64 v) { - return (v <= 0xff); + return (v <= UCHAR_MAX); } static inline int iss16(int64_t v) { - return (v >= -0x8000 && v <= 0x7fff); + return (SHRT_MIN <= v && v <= SHRT_MAX); } static inline int isu16(u64 v) { - return (v <= 0xffff); + return (v <= USHRT_MAX); } static inline int iss32(int64_t v) { - return (v >= -0x80000000L && v <= 0x7fffffff); + return (INT_MIN <= v && v <= INT_MAX); } static inline int isu32(u64 v) { - return (v <= 0xffffffff); + return (v <= UINT_MAX); } static void emit_opsingle(const char* mnemonic, arg_t arg1, arg_t arg2, void* data) |