Re: [PATCH] D12861: [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64
This revision was automatically updated to reflect the committed changes. Closed by commit rL247622: [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64 (authored by djg). Changed prior to commit: http://reviews.llvm.org/D12861?vs=34727=34738#toc Repository: rL LLVM http://reviews.llvm.org/D12861 Files: cfe/trunk/include/clang/Basic/TargetInfo.h cfe/trunk/lib/Basic/Targets.cpp cfe/trunk/test/Preprocessor/init.c Index: cfe/trunk/test/Preprocessor/init.c === --- cfe/trunk/test/Preprocessor/init.c +++ cfe/trunk/test/Preprocessor/init.c @@ -8845,10 +8845,10 @@ // WEBASSEMBLY64-NEXT:#define __INT_FAST32_FMTi__ "i"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST32_MAX__ 2147483647{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST32_TYPE__ int{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTd__ "ld"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTi__ "li"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807L{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_TYPE__ long int{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTd__ "lld"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTi__ "lli"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807LL{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_TYPE__ long long int{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST8_FMTd__ "hhd"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST8_FMTi__ "hhi"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST8_MAX__ 127{{$}} @@ -8861,10 +8861,10 @@ // WEBASSEMBLY64-NEXT:#define __INT_LEAST32_FMTi__ "i"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST32_MAX__ 2147483647{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST32_TYPE__ int{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTd__ "ld"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTi__ "li"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807L{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_TYPE__ long int{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTd__ "lld"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTi__ "lli"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807LL{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_TYPE__ long long int{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST8_FMTd__ "hhd"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST8_FMTi__ "hhi"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST8_MAX__ 127{{$}} @@ -8989,12 +8989,12 @@ // WEBASSEMBLY64-NEXT:#define __UINT_FAST32_FMTx__ "x"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST32_MAX__ 4294967295U{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST32_TYPE__ unsigned int{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTX__ "lX"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTo__ "lo"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTu__ "lu"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTx__ "lx"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615UL{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_TYPE__ long unsigned int{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTX__ "llX"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTo__ "llo"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTu__ "llu"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTx__ "llx"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_TYPE__ long long unsigned int{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTX__ "hhX"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTo__ "hho"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTu__ "hhu"{{$}} @@ -9013,12 +9013,12 @@ // WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_FMTx__ "x"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_MAX__ 4294967295U{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_TYPE__ unsigned int{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTX__ "lX"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTo__ "lo"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTu__ "lu"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTx__ "lx"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615UL{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_TYPE__ long unsigned int{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTX__ "llX"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTo__ "llo"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTu__ "llu"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTx__ "llx"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_TYPE__ long long unsigned int{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTX__ "hhX"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTo__ "hho"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTu__ "hhu"{{$}} Index:
[PATCH] D12861: [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64
sunfish created this revision. sunfish added a reviewer: jfb. sunfish added a subscriber: cfe-commits. sunfish set the repository for this revision to rL LLVM. Herald added subscribers: dschuff, jfb. This makes int_fast64_t and int_least64_t the same type as int64_t, and eliminates a difference between wasm32 and wasm64. Repository: rL LLVM http://reviews.llvm.org/D12861 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp test/Preprocessor/init.c Index: test/Preprocessor/init.c === --- test/Preprocessor/init.c +++ test/Preprocessor/init.c @@ -8845,10 +8845,10 @@ // WEBASSEMBLY64-NEXT:#define __INT_FAST32_FMTi__ "i"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST32_MAX__ 2147483647{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST32_TYPE__ int{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTd__ "ld"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTi__ "li"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807L{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_TYPE__ long int{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTd__ "lld"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTi__ "lli"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807LL{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_FAST64_TYPE__ long long int{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST8_FMTd__ "hhd"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST8_FMTi__ "hhi"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_FAST8_MAX__ 127{{$}} @@ -8861,10 +8861,10 @@ // WEBASSEMBLY64-NEXT:#define __INT_LEAST32_FMTi__ "i"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST32_MAX__ 2147483647{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST32_TYPE__ int{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTd__ "ld"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTi__ "li"{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807L{{$}} -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_TYPE__ long int{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTd__ "lld"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTi__ "lli"{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807LL{{$}} +// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_TYPE__ long long int{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST8_FMTd__ "hhd"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST8_FMTi__ "hhi"{{$}} // WEBASSEMBLY64-NEXT:#define __INT_LEAST8_MAX__ 127{{$}} @@ -8989,12 +8989,12 @@ // WEBASSEMBLY64-NEXT:#define __UINT_FAST32_FMTx__ "x"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST32_MAX__ 4294967295U{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST32_TYPE__ unsigned int{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTX__ "lX"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTo__ "lo"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTu__ "lu"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTx__ "lx"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615UL{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_TYPE__ long unsigned int{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTX__ "llX"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTo__ "llo"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTu__ "llu"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTx__ "llx"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_TYPE__ long long unsigned int{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTX__ "hhX"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTo__ "hho"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTu__ "hhu"{{$}} @@ -9013,12 +9013,12 @@ // WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_FMTx__ "x"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_MAX__ 4294967295U{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_TYPE__ unsigned int{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTX__ "lX"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTo__ "lo"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTu__ "lu"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTx__ "lx"{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615UL{{$}} -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_TYPE__ long unsigned int{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTX__ "llX"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTo__ "llo"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTu__ "llu"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTx__ "llx"{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL{{$}} +// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_TYPE__ long long unsigned int{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTX__ "hhX"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTo__ "hho"{{$}} // WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTu__ "hhu"{{$}} Index: lib/Basic/Targets.cpp