From 2a02c2e33129017d41b751921e27909ee97e0719 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 14 Feb 2017 18:38:19 +0000 Subject: [PATCH] Fix some warnings in intrin.h llvm-svn: 295082 --- clang/lib/Headers/intrin.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h index 1b98dd8267ee..930d46552f47 100644 --- a/clang/lib/Headers/intrin.h +++ b/clang/lib/Headers/intrin.h @@ -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