Fix some warnings in intrin.h

llvm-svn: 295082
This commit is contained in:
Reid Kleckner 2017-02-14 18:38:19 +00:00
parent bb0483bc8e
commit 2a02c2e331
1 changed files with 6 additions and 4 deletions

View File

@ -897,19 +897,21 @@ __readfsqword(unsigned long __offset) {
#ifdef __x86_64__
static __inline__ unsigned char __DEFAULT_FN_ATTRS
__readgsbyte(unsigned long __offset) {
return *__ptr_to_addr_space(256, unsigned char, __offset);
return *__ptr_to_addr_space(256, unsigned char, (unsigned long long)__offset);
}
static __inline__ unsigned short __DEFAULT_FN_ATTRS
__readgsword(unsigned long __offset) {
return *__ptr_to_addr_space(256, unsigned short, __offset);
return *__ptr_to_addr_space(256, unsigned short,
(unsigned long long)__offset);
}
static __inline__ unsigned long __DEFAULT_FN_ATTRS
__readgsdword(unsigned long __offset) {
return *__ptr_to_addr_space(256, unsigned long, __offset);
return *__ptr_to_addr_space(256, unsigned long, (unsigned long long)__offset);
}
static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
__readgsqword(unsigned long __offset) {
return *__ptr_to_addr_space(256, unsigned __int64, __offset);
return *__ptr_to_addr_space(256, unsigned __int64,
(unsigned long long)__offset);
}
#endif
#undef __ptr_to_addr_space