PATCH: set NVPTX64 target's size_t to match other 64-bit targets
Peter Collingbourne
peter at pcc.me.uk
Wed Apr 1 11:00:55 PDT 2015
LGTM
On Mon, Mar 30, 2015 at 12:50:33PM -0700, Eli Bendersky wrote:
>
> Index: lib/Basic/Targets.cpp
> ===================================================================
> --- lib/Basic/Targets.cpp (revision 233578)
> +++ lib/Basic/Targets.cpp (working copy)
> @@ -1601,8 +1601,8 @@
> public:
> NVPTX64TargetInfo(const llvm::Triple &Triple) : NVPTXTargetInfo(Triple) {
> PointerWidth = PointerAlign = 64;
> - SizeType = PtrDiffType = TargetInfo::UnsignedLongLong;
> - IntPtrType = TargetInfo::SignedLongLong;
> + SizeType = PtrDiffType = TargetInfo::UnsignedLong;
> + IntPtrType = TargetInfo::SignedLong;
> DescriptionString = "e-i64:64-v16:16-v32:32-n16:32:64";
> }
> };
> Index: test/Preprocessor/init.c
> ===================================================================
> --- test/Preprocessor/init.c (revision 233578)
> +++ test/Preprocessor/init.c (working copy)
> @@ -4898,10 +4898,10 @@
> // NVPTX64:#define __INTMAX_MAX__ 9223372036854775807LL
> // NVPTX64:#define __INTMAX_TYPE__ long long int
> // NVPTX64:#define __INTMAX_WIDTH__ 64
> -// NVPTX64:#define __INTPTR_FMTd__ "lld"
> -// NVPTX64:#define __INTPTR_FMTi__ "lli"
> -// NVPTX64:#define __INTPTR_MAX__ 9223372036854775807LL
> -// NVPTX64:#define __INTPTR_TYPE__ long long int
> +// NVPTX64:#define __INTPTR_FMTd__ "ld"
> +// NVPTX64:#define __INTPTR_FMTi__ "li"
> +// NVPTX64:#define __INTPTR_MAX__ 9223372036854775807L
> +// NVPTX64:#define __INTPTR_TYPE__ long int
> // NVPTX64:#define __INTPTR_WIDTH__ 64
> // NVPTX64:#define __INT_FAST16_FMTd__ "hd"
> // NVPTX64:#define __INT_FAST16_FMTi__ "hi"
> @@ -4956,7 +4956,7 @@
> // NVPTX64:#define __NVPTX__ 1
> // NVPTX64:#define __POINTER_WIDTH__ 64
> // NVPTX64:#define __PRAGMA_REDEFINE_EXTNAME 1
> -// NVPTX64:#define __PTRDIFF_TYPE__ long long unsigned int
> +// NVPTX64:#define __PTRDIFF_TYPE__ long unsigned int
> // NVPTX64:#define __PTRDIFF_WIDTH__ 64
> // NVPTX64:#define __PTX__ 1
> // NVPTX64:#define __SCHAR_MAX__ 127
> @@ -4976,7 +4976,7 @@
> // NVPTX64:#define __SIZEOF_WCHAR_T__ 4
> // NVPTX64:#define __SIZEOF_WINT_T__ 4
> // NVPTX64:#define __SIZE_MAX__ 18446744073709551615UL
> -// NVPTX64:#define __SIZE_TYPE__ long long unsigned int
> +// NVPTX64:#define __SIZE_TYPE__ long unsigned int
> // NVPTX64:#define __SIZE_WIDTH__ 64
> // NVPTX64:#define __UINT16_C_SUFFIX__ {{$}}
> // NVPTX64:#define __UINT16_MAX__ 65535
> @@ -4994,8 +4994,8 @@
> // NVPTX64:#define __UINTMAX_MAX__ 18446744073709551615ULL
> // NVPTX64:#define __UINTMAX_TYPE__ long long unsigned int
> // NVPTX64:#define __UINTMAX_WIDTH__ 64
> -// NVPTX64:#define __UINTPTR_MAX__ 18446744073709551615ULL
> -// NVPTX64:#define __UINTPTR_TYPE__ long long unsigned int
> +// NVPTX64:#define __UINTPTR_MAX__ 18446744073709551615UL
> +// NVPTX64:#define __UINTPTR_TYPE__ long unsigned int
> // NVPTX64:#define __UINTPTR_WIDTH__ 64
> // NVPTX64:#define __UINT_FAST16_MAX__ 65535
> // NVPTX64:#define __UINT_FAST16_TYPE__ unsigned short
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
--
Peter
More information about the cfe-commits
mailing list