From 413129be4a970ce039618a645b1141968ee9b3f4 Mon Sep 17 00:00:00 2001 From: Clemens Hammacher Date: Fri, 1 Dec 2017 09:58:16 +0100 Subject: [PATCH] [cleanup] Replace V8_UINT64_C macro by proper C++11 syntax V8_INT64_C will be cleaned up in a follow-up CL. R=tebbi@chromium.org,mlippautz@chromium.org Bug: v8:7109 Change-Id: I6af97e7266039eb443896b404b77b8e2b5de5adb Reviewed-on: https://chromium-review.googlesource.com/803294 Reviewed-by: Michael Lippautz Reviewed-by: Tobias Tebbi Commit-Queue: Clemens Hammacher Cr-Commit-Position: refs/heads/master@{#49790} --- src/arm/simulator-arm.cc | 4 +- src/arm64/assembler-arm64.cc | 4 +- src/assembler.cc | 8 +- src/base/functional.cc | 2 +- src/base/macros.h | 5 - src/base/platform/platform-posix.cc | 12 +- src/base/utils/random-number-generator.cc | 4 +- src/base/utils/random-number-generator.h | 4 +- src/compiler/machine-operator-reducer.cc | 4 +- src/execution.h | 4 +- src/globals.h | 14 +- src/objects-debug.cc | 8 +- test/cctest/compiler/test-run-machops.cc | 6 +- test/cctest/test-assembler-x64.cc | 192 +++++++++--------- test/cctest/test-field-type-tracking.cc | 2 +- test/unittests/base/bits-unittest.cc | 14 +- .../instruction-selector-arm64-unittest.cc | 12 +- .../machine-operator-reducer-unittest.cc | 4 +- .../instruction-selector-mips64-unittest.cc | 8 +- .../simplified-operator-reducer-unittest.cc | 5 +- 20 files changed, 155 insertions(+), 161 deletions(-) diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc index 8ab6cb6b5c..f74246261f 100644 --- a/src/arm/simulator-arm.cc +++ b/src/arm/simulator-arm.cc @@ -1982,7 +1982,7 @@ Float32 Simulator::canonicalizeNaN(Float32 value) { double Simulator::canonicalizeNaN(double value) { // Default NaN value, see "NaN handling" in "IEEE 754 standard implementation // choices" of the ARM Reference Manual. - constexpr uint64_t kDefaultNaN = V8_UINT64_C(0x7FF8000000000000); + constexpr uint64_t kDefaultNaN = uint64_t{0x7FF8000000000000}; if (FPSCR_default_NaN_mode_ && std::isnan(value)) { value = bit_cast(kDefaultNaN); } @@ -1993,7 +1993,7 @@ Float64 Simulator::canonicalizeNaN(Float64 value) { // Default NaN value, see "NaN handling" in "IEEE 754 standard implementation // choices" of the ARM Reference Manual. constexpr Float64 kDefaultNaN = - Float64::FromBits(V8_UINT64_C(0x7FF8000000000000)); + Float64::FromBits(uint64_t{0x7FF8000000000000}); return FPSCR_default_NaN_mode_ && value.is_nan() ? kDefaultNaN : value; } diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc index 2093a89df6..56b4da88ed 100644 --- a/src/arm64/assembler-arm64.cc +++ b/src/arm64/assembler-arm64.cc @@ -4526,7 +4526,7 @@ bool Assembler::IsImmLogical(uint64_t value, clz_a = CountLeadingZeros(a, kXRegSizeInBits); int clz_c = CountLeadingZeros(c, kXRegSizeInBits); d = clz_a - clz_c; - mask = ((V8_UINT64_C(1) << d) - 1); + mask = ((uint64_t{1} << d) - 1); out_n = 0; } else { // Handle degenerate cases. @@ -4547,7 +4547,7 @@ bool Assembler::IsImmLogical(uint64_t value, // the general case above, and set the N bit in the output. clz_a = CountLeadingZeros(a, kXRegSizeInBits); d = 64; - mask = ~V8_UINT64_C(0); + mask = ~uint64_t{0}; out_n = 1; } } diff --git a/src/assembler.cc b/src/assembler.cc index 90d7ac3ff8..792927616e 100644 --- a/src/assembler.cc +++ b/src/assembler.cc @@ -131,14 +131,14 @@ static struct V8_ALIGNED(16) { static struct V8_ALIGNED(16) { uint64_t a; uint64_t b; -} double_absolute_constant = {V8_UINT64_C(0x7FFFFFFFFFFFFFFF), - V8_UINT64_C(0x7FFFFFFFFFFFFFFF)}; +} double_absolute_constant = {uint64_t{0x7FFFFFFFFFFFFFFF}, + uint64_t{0x7FFFFFFFFFFFFFFF}}; static struct V8_ALIGNED(16) { uint64_t a; uint64_t b; -} double_negate_constant = {V8_UINT64_C(0x8000000000000000), - V8_UINT64_C(0x8000000000000000)}; +} double_negate_constant = {uint64_t{0x8000000000000000}, + uint64_t{0x8000000000000000}}; const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; diff --git a/src/base/functional.cc b/src/base/functional.cc index 80a7585bcc..512f3ee158 100644 --- a/src/base/functional.cc +++ b/src/base/functional.cc @@ -80,7 +80,7 @@ size_t hash_combine(size_t seed, size_t value) { seed = bits::RotateRight32(seed, 13); seed = seed * 5 + 0xe6546b64; #else - const uint64_t m = V8_UINT64_C(0xc6a4a7935bd1e995); + const uint64_t m = uint64_t{0xc6a4a7935bd1e995}; const uint32_t r = 47; value *= m; diff --git a/src/base/macros.h b/src/base/macros.h index 5aa8eff68d..962cc1bea8 100644 --- a/src/base/macros.h +++ b/src/base/macros.h @@ -214,7 +214,6 @@ struct Use { // than defining __STDC_CONSTANT_MACROS before including , and it // works on compilers that don't have it (like MSVC). #if V8_CC_MSVC -# define V8_UINT64_C(x) (x ## UI64) # define V8_INT64_C(x) (x ## I64) # if V8_HOST_ARCH_64_BIT # define V8_INTPTR_C(x) (x ## I64) @@ -224,22 +223,18 @@ struct Use { # define V8_PTR_PREFIX "" # endif // V8_HOST_ARCH_64_BIT #elif V8_CC_MINGW64 -# define V8_UINT64_C(x) (x ## ULL) # define V8_INT64_C(x) (x ## LL) # define V8_INTPTR_C(x) (x ## LL) # define V8_PTR_PREFIX "I64" #elif V8_HOST_ARCH_64_BIT # if V8_OS_MACOSX || V8_OS_OPENBSD -# define V8_UINT64_C(x) (x ## ULL) # define V8_INT64_C(x) (x ## LL) # else -# define V8_UINT64_C(x) (x ## UL) # define V8_INT64_C(x) (x ## L) # endif # define V8_INTPTR_C(x) (x ## L) # define V8_PTR_PREFIX "l" #else -# define V8_UINT64_C(x) (x ## ULL) # define V8_INT64_C(x) (x ## LL) # define V8_INTPTR_C(x) (x) #if V8_OS_AIX diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc index b3ed169ae0..91bdb189b9 100644 --- a/src/base/platform/platform-posix.cc +++ b/src/base/platform/platform-posix.cc @@ -206,26 +206,26 @@ void* OS::GetRandomMmapAddr() { // Currently available CPUs have 48 bits of virtual addressing. Truncate // the hint address to 46 bits to give the kernel a fighting chance of // fulfilling our placement request. - raw_addr &= V8_UINT64_C(0x3ffffffff000); + raw_addr &= uint64_t{0x3ffffffff000}; #elif V8_TARGET_ARCH_PPC64 #if V8_OS_AIX // AIX: 64 bits of virtual addressing, but we limit address range to: // a) minimize Segment Lookaside Buffer (SLB) misses and - raw_addr &= V8_UINT64_C(0x3ffff000); + raw_addr &= uint64_t{0x3ffff000}; // Use extra address space to isolate the mmap regions. - raw_addr += V8_UINT64_C(0x400000000000); + raw_addr += uint64_t{0x400000000000}; #elif V8_TARGET_BIG_ENDIAN // Big-endian Linux: 44 bits of virtual addressing. - raw_addr &= V8_UINT64_C(0x03fffffff000); + raw_addr &= uint64_t{0x03fffffff000}; #else // Little-endian Linux: 48 bits of virtual addressing. - raw_addr &= V8_UINT64_C(0x3ffffffff000); + raw_addr &= uint64_t{0x3ffffffff000}; #endif #elif V8_TARGET_ARCH_S390X // Linux on Z uses bits 22-32 for Region Indexing, which translates to 42 bits // of virtual addressing. Truncate to 40 bits to allow kernel chance to // fulfill request. - raw_addr &= V8_UINT64_C(0xfffffff000); + raw_addr &= uint64_t{0xfffffff000}; #elif V8_TARGET_ARCH_S390 // 31 bits of virtual addressing. Truncate to 29 bits to allow kernel chance // to fulfill request. diff --git a/src/base/utils/random-number-generator.cc b/src/base/utils/random-number-generator.cc index 86c3694feb..afe5a1f098 100644 --- a/src/base/utils/random-number-generator.cc +++ b/src/base/utils/random-number-generator.cc @@ -213,9 +213,9 @@ void RandomNumberGenerator::SetSeed(int64_t seed) { uint64_t RandomNumberGenerator::MurmurHash3(uint64_t h) { h ^= h >> 33; - h *= V8_UINT64_C(0xFF51AFD7ED558CCD); + h *= uint64_t{0xFF51AFD7ED558CCD}; h ^= h >> 33; - h *= V8_UINT64_C(0xC4CEB9FE1A85EC53); + h *= uint64_t{0xC4CEB9FE1A85EC53}; h ^= h >> 33; return h; } diff --git a/src/base/utils/random-number-generator.h b/src/base/utils/random-number-generator.h index 285c5972e0..321ce861fb 100644 --- a/src/base/utils/random-number-generator.h +++ b/src/base/utils/random-number-generator.h @@ -113,8 +113,8 @@ class V8_BASE_EXPORT RandomNumberGenerator final { // Static and exposed for external use. static inline double ToDouble(uint64_t state0, uint64_t state1) { // Exponent for double values for [1.0 .. 2.0) - static const uint64_t kExponentBits = V8_UINT64_C(0x3FF0000000000000); - static const uint64_t kMantissaMask = V8_UINT64_C(0x000FFFFFFFFFFFFF); + static const uint64_t kExponentBits = uint64_t{0x3FF0000000000000}; + static const uint64_t kMantissaMask = uint64_t{0x000FFFFFFFFFFFFF}; uint64_t random = ((state0 + state1) & kMantissaMask) | kExponentBits; return bit_cast(random) - 1; } diff --git a/src/compiler/machine-operator-reducer.cc b/src/compiler/machine-operator-reducer.cc index e589f0cbd8..6fd156b2ab 100644 --- a/src/compiler/machine-operator-reducer.cc +++ b/src/compiler/machine-operator-reducer.cc @@ -1344,7 +1344,7 @@ Reduction MachineOperatorReducer::ReduceFloat64InsertLowWord32(Node* node) { Uint32Matcher mrhs(node->InputAt(1)); if (mlhs.HasValue() && mrhs.HasValue()) { return ReplaceFloat64(bit_cast( - (bit_cast(mlhs.Value()) & V8_UINT64_C(0xFFFFFFFF00000000)) | + (bit_cast(mlhs.Value()) & uint64_t{0xFFFFFFFF00000000}) | mrhs.Value())); } return NoChange(); @@ -1357,7 +1357,7 @@ Reduction MachineOperatorReducer::ReduceFloat64InsertHighWord32(Node* node) { Uint32Matcher mrhs(node->InputAt(1)); if (mlhs.HasValue() && mrhs.HasValue()) { return ReplaceFloat64(bit_cast( - (bit_cast(mlhs.Value()) & V8_UINT64_C(0xFFFFFFFF)) | + (bit_cast(mlhs.Value()) & uint64_t{0xFFFFFFFF}) | (static_cast(mrhs.Value()) << 32))); } return NoChange(); diff --git a/src/execution.h b/src/execution.h index eeebfadde2..c4921b3450 100644 --- a/src/execution.h +++ b/src/execution.h @@ -162,8 +162,8 @@ class V8_EXPORT_PRIVATE StackGuard final { void DisableInterrupts(); #if V8_TARGET_ARCH_64_BIT - static const uintptr_t kInterruptLimit = V8_UINT64_C(0xfffffffffffffffe); - static const uintptr_t kIllegalLimit = V8_UINT64_C(0xfffffffffffffff8); + static const uintptr_t kInterruptLimit = uintptr_t{0xfffffffffffffffe}; + static const uintptr_t kIllegalLimit = uintptr_t{0xfffffffffffffff8}; #else static const uintptr_t kInterruptLimit = 0xfffffffe; static const uintptr_t kIllegalLimit = 0xfffffff8; diff --git a/src/globals.h b/src/globals.h index dda54e0c82..6040669742 100644 --- a/src/globals.h +++ b/src/globals.h @@ -182,7 +182,7 @@ const size_t kMaxWasmCodeMemory = 256 * MB; #if V8_HOST_ARCH_64_BIT const int kPointerSizeLog2 = 3; const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000); -const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF); +const uintptr_t kUintptrAllBitsSet = uintptr_t{0xFFFFFFFFFFFFFFFF}; const bool kRequiresCodeRange = true; #if V8_TARGET_ARCH_MIPS64 // To use pseudo-relative jumps such as j/jal instructions which have 28-bit @@ -427,15 +427,15 @@ const intptr_t kPageHeaderTagMask = (1 << kPageHeaderTagSize) - 1; // Should be a recognizable hex value tagged as a failure. #ifdef V8_HOST_ARCH_64_BIT const Address kZapValue = - reinterpret_cast
(V8_UINT64_C(0xdeadbeedbeadbeef)); + reinterpret_cast
(uint64_t{0xdeadbeedbeadbeef}); const Address kHandleZapValue = - reinterpret_cast
(V8_UINT64_C(0x1baddead0baddeaf)); + reinterpret_cast
(uint64_t{0x1baddead0baddeaf}); const Address kGlobalHandleZapValue = - reinterpret_cast
(V8_UINT64_C(0x1baffed00baffedf)); + reinterpret_cast
(uint64_t{0x1baffed00baffedf}); const Address kFromSpaceZapValue = - reinterpret_cast
(V8_UINT64_C(0x1beefdad0beefdaf)); -const uint64_t kDebugZapValue = V8_UINT64_C(0xbadbaddbbadbaddb); -const uint64_t kSlotsZapValue = V8_UINT64_C(0xbeefdeadbeefdeef); + reinterpret_cast
(uint64_t{0x1beefdad0beefdaf}); +const uint64_t kDebugZapValue = uint64_t{0xbadbaddbbadbaddb}; +const uint64_t kSlotsZapValue = uint64_t{0xbeefdeadbeefdeef}; const uint64_t kFreeListZapValue = 0xfeed1eaffeed1eaf; #else const Address kZapValue = reinterpret_cast
(0xdeadbeef); diff --git a/src/objects-debug.cc b/src/objects-debug.cc index f1f49d5c45..b61df9fec4 100644 --- a/src/objects-debug.cc +++ b/src/objects-debug.cc @@ -475,11 +475,11 @@ void FixedDoubleArray::FixedDoubleArrayVerify() { uint64_t value = get_representation(i); uint64_t unexpected = bit_cast(std::numeric_limits::quiet_NaN()) & - V8_UINT64_C(0x7FF8000000000000); + uint64_t{0x7FF8000000000000}; // Create implementation specific sNaN by inverting relevant bit. - unexpected ^= V8_UINT64_C(0x0008000000000000); - CHECK((value & V8_UINT64_C(0x7FF8000000000000)) != unexpected || - (value & V8_UINT64_C(0x0007FFFFFFFFFFFF)) == V8_UINT64_C(0)); + unexpected ^= uint64_t{0x0008000000000000}; + CHECK((value & uint64_t{0x7FF8000000000000}) != unexpected || + (value & uint64_t{0x0007FFFFFFFFFFFF}) == uint64_t{0}); } } } diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc index ff8c83536b..8d21c3d689 100644 --- a/test/cctest/compiler/test-run-machops.cc +++ b/test/cctest/compiler/test-run-machops.cc @@ -5722,9 +5722,9 @@ TEST(RunFloat64InsertLowWord32) { m.Return(m.Float64InsertLowWord32(m.Parameter(0), m.Parameter(1))); FOR_FLOAT64_INPUTS(i) { FOR_INT32_INPUTS(j) { - double expected = bit_cast( - (bit_cast(*i) & ~(V8_UINT64_C(0xFFFFFFFF))) | - (static_cast(bit_cast(*j)))); + double expected = + bit_cast((bit_cast(*i) & ~(uint64_t{0xFFFFFFFF})) | + (static_cast(bit_cast(*j)))); CHECK_DOUBLE_EQ(expected, m.Call(*i, *j)); } } diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc index e356fb2d82..7e272950ac 100644 --- a/test/cctest/test-assembler-x64.cc +++ b/test/cctest/test-assembler-x64.cc @@ -1596,29 +1596,29 @@ TEST(AssemblerX64AVX_sd) { __ j(not_equal, &exit); // Test vpcmpeqd - __ movq(rdx, V8_UINT64_C(0x0123456789abcdef)); - __ movq(rcx, V8_UINT64_C(0x0123456788888888)); + __ movq(rdx, uint64_t{0x0123456789abcdef}); + __ movq(rcx, uint64_t{0x0123456788888888}); __ vmovq(xmm6, rdx); __ vmovq(xmm7, rcx); __ vpcmpeqd(xmm8, xmm6, xmm7); __ vmovq(rdx, xmm8); - __ movq(rcx, V8_UINT64_C(0xffffffff00000000)); + __ movq(rcx, uint64_t{0xffffffff00000000}); __ cmpq(rcx, rdx); __ movl(rax, Immediate(13)); __ j(not_equal, &exit); // Test vpsllq, vpsrlq __ movl(rax, Immediate(13)); - __ movq(rdx, V8_UINT64_C(0x0123456789abcdef)); + __ movq(rdx, uint64_t{0x0123456789abcdef}); __ vmovq(xmm6, rdx); __ vpsrlq(xmm7, xmm6, 4); __ vmovq(rdx, xmm7); - __ movq(rcx, V8_UINT64_C(0x00123456789abcde)); + __ movq(rcx, uint64_t{0x00123456789abcde}); __ cmpq(rdx, rcx); __ j(not_equal, &exit); __ vpsllq(xmm7, xmm6, 12); __ vmovq(rdx, xmm7); - __ movq(rcx, V8_UINT64_C(0x3456789abcdef000)); + __ movq(rcx, uint64_t{0x3456789abcdef000}); __ cmpq(rdx, rcx); __ j(not_equal, &exit); @@ -1643,7 +1643,7 @@ TEST(AssemblerX64AVX_sd) { // Test vsqrtsd __ movl(rax, Immediate(15)); - __ movq(rdx, V8_UINT64_C(0x4004000000000000)); // 2.5 + __ movq(rdx, uint64_t{0x4004000000000000}); // 2.5 __ vmovq(xmm4, rdx); __ vmulsd(xmm5, xmm4, xmm4); __ vmovsd(Operand(rsp, 0), xmm5); @@ -1658,10 +1658,10 @@ TEST(AssemblerX64AVX_sd) { // Test vroundsd __ movl(rax, Immediate(16)); - __ movq(rdx, V8_UINT64_C(0x4002000000000000)); // 2.25 + __ movq(rdx, uint64_t{0x4002000000000000}); // 2.25 __ vmovq(xmm4, rdx); __ vroundsd(xmm5, xmm4, xmm4, kRoundUp); - __ movq(rcx, V8_UINT64_C(0x4008000000000000)); // 3.0 + __ movq(rcx, uint64_t{0x4008000000000000}); // 3.0 __ vmovq(xmm6, rcx); __ vucomisd(xmm5, xmm6); __ j(not_equal, &exit); @@ -1669,7 +1669,7 @@ TEST(AssemblerX64AVX_sd) { // Test vcvtlsi2sd __ movl(rax, Immediate(17)); __ movl(rdx, Immediate(6)); - __ movq(rcx, V8_UINT64_C(0x4018000000000000)); // 6.0 + __ movq(rcx, uint64_t{0x4018000000000000}); // 6.0 __ vmovq(xmm5, rcx); __ vcvtlsi2sd(xmm6, xmm6, rdx); __ vucomisd(xmm5, xmm6); @@ -1681,8 +1681,8 @@ TEST(AssemblerX64AVX_sd) { // Test vcvtqsi2sd __ movl(rax, Immediate(18)); - __ movq(rdx, V8_UINT64_C(0x2000000000000000)); // 2 << 0x3c - __ movq(rcx, V8_UINT64_C(0x43c0000000000000)); + __ movq(rdx, uint64_t{0x2000000000000000}); // 2 << 0x3c + __ movq(rcx, uint64_t{0x43c0000000000000}); __ vmovq(xmm5, rcx); __ vcvtqsi2sd(xmm6, xmm6, rdx); __ vucomisd(xmm5, xmm6); @@ -1690,7 +1690,7 @@ TEST(AssemblerX64AVX_sd) { // Test vcvtsd2si __ movl(rax, Immediate(19)); - __ movq(rdx, V8_UINT64_C(0x4018000000000000)); // 6.0 + __ movq(rdx, uint64_t{0x4018000000000000}); // 6.0 __ vmovq(xmm5, rdx); __ vcvtsd2si(rcx, xmm5); __ cmpl(rcx, Immediate(6)); @@ -1775,160 +1775,160 @@ TEST(AssemblerX64BMI1) { CpuFeatureScope fscope(&masm, BMI1); Label exit; - __ movq(rcx, V8_UINT64_C(0x1122334455667788)); // source operand + __ movq(rcx, uint64_t{0x1122334455667788}); // source operand __ pushq(rcx); // For memory operand // andn - __ movq(rdx, V8_UINT64_C(0x1000000020000000)); + __ movq(rdx, uint64_t{0x1000000020000000}); __ movl(rax, Immediate(1)); // Test number __ andnq(r8, rdx, rcx); - __ movq(r9, V8_UINT64_C(0x0122334455667788)); // expected result + __ movq(r9, uint64_t{0x0122334455667788}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ andnq(r8, rdx, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0122334455667788)); // expected result + __ movq(r9, uint64_t{0x0122334455667788}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ andnl(r8, rdx, rcx); - __ movq(r9, V8_UINT64_C(0x0000000055667788)); // expected result + __ movq(r9, uint64_t{0x0000000055667788}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ andnl(r8, rdx, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000055667788)); // expected result + __ movq(r9, uint64_t{0x0000000055667788}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // bextr - __ movq(rdx, V8_UINT64_C(0x0000000000002808)); + __ movq(rdx, uint64_t{0x0000000000002808}); __ incq(rax); __ bextrq(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000003344556677)); // expected result + __ movq(r9, uint64_t{0x0000003344556677}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ bextrq(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000003344556677)); // expected result + __ movq(r9, uint64_t{0x0000003344556677}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ bextrl(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000000000556677)); // expected result + __ movq(r9, uint64_t{0x0000000000556677}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ bextrl(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000000000556677)); // expected result + __ movq(r9, uint64_t{0x0000000000556677}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // blsi __ incq(rax); __ blsiq(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000008)); // expected result + __ movq(r9, uint64_t{0x0000000000000008}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsiq(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000008)); // expected result + __ movq(r9, uint64_t{0x0000000000000008}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsil(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000008)); // expected result + __ movq(r9, uint64_t{0x0000000000000008}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsil(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000008)); // expected result + __ movq(r9, uint64_t{0x0000000000000008}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // blsmsk __ incq(rax); __ blsmskq(r8, rcx); - __ movq(r9, V8_UINT64_C(0x000000000000000f)); // expected result + __ movq(r9, uint64_t{0x000000000000000f}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsmskq(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x000000000000000f)); // expected result + __ movq(r9, uint64_t{0x000000000000000f}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsmskl(r8, rcx); - __ movq(r9, V8_UINT64_C(0x000000000000000f)); // expected result + __ movq(r9, uint64_t{0x000000000000000f}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsmskl(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x000000000000000f)); // expected result + __ movq(r9, uint64_t{0x000000000000000f}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // blsr __ incq(rax); __ blsrq(r8, rcx); - __ movq(r9, V8_UINT64_C(0x1122334455667780)); // expected result + __ movq(r9, uint64_t{0x1122334455667780}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsrq(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x1122334455667780)); // expected result + __ movq(r9, uint64_t{0x1122334455667780}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsrl(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000055667780)); // expected result + __ movq(r9, uint64_t{0x0000000055667780}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ blsrl(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000055667780)); // expected result + __ movq(r9, uint64_t{0x0000000055667780}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // tzcnt __ incq(rax); __ tzcntq(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000003)); // expected result + __ movq(r9, uint64_t{0x0000000000000003}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ tzcntq(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000003)); // expected result + __ movq(r9, uint64_t{0x0000000000000003}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ tzcntl(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000003)); // expected result + __ movq(r9, uint64_t{0x0000000000000003}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ tzcntl(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000003)); // expected result + __ movq(r9, uint64_t{0x0000000000000003}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); @@ -1965,30 +1965,30 @@ TEST(AssemblerX64LZCNT) { CpuFeatureScope fscope(&masm, LZCNT); Label exit; - __ movq(rcx, V8_UINT64_C(0x1122334455667788)); // source operand + __ movq(rcx, uint64_t{0x1122334455667788}); // source operand __ pushq(rcx); // For memory operand __ movl(rax, Immediate(1)); // Test number __ lzcntq(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000003)); // expected result + __ movq(r9, uint64_t{0x0000000000000003}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ lzcntq(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000003)); // expected result + __ movq(r9, uint64_t{0x0000000000000003}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ lzcntl(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000001)); // expected result + __ movq(r9, uint64_t{0x0000000000000001}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ lzcntl(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000001)); // expected result + __ movq(r9, uint64_t{0x0000000000000001}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); @@ -2025,30 +2025,30 @@ TEST(AssemblerX64POPCNT) { CpuFeatureScope fscope(&masm, POPCNT); Label exit; - __ movq(rcx, V8_UINT64_C(0x1111111111111100)); // source operand + __ movq(rcx, uint64_t{0x1111111111111100}); // source operand __ pushq(rcx); // For memory operand __ movl(rax, Immediate(1)); // Test number __ popcntq(r8, rcx); - __ movq(r9, V8_UINT64_C(0x000000000000000e)); // expected result + __ movq(r9, uint64_t{0x000000000000000e}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ popcntq(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x000000000000000e)); // expected result + __ movq(r9, uint64_t{0x000000000000000e}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ popcntl(r8, rcx); - __ movq(r9, V8_UINT64_C(0x0000000000000006)); // expected result + __ movq(r9, uint64_t{0x0000000000000006}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ popcntl(r8, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000000000006)); // expected result + __ movq(r9, uint64_t{0x0000000000000006}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); @@ -2085,232 +2085,232 @@ TEST(AssemblerX64BMI2) { CpuFeatureScope fscope(&masm, BMI2); Label exit; __ pushq(rbx); // save rbx - __ movq(rcx, V8_UINT64_C(0x1122334455667788)); // source operand + __ movq(rcx, uint64_t{0x1122334455667788}); // source operand __ pushq(rcx); // For memory operand // bzhi - __ movq(rdx, V8_UINT64_C(0x0000000000000009)); + __ movq(rdx, uint64_t{0x0000000000000009}); __ movl(rax, Immediate(1)); // Test number __ bzhiq(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000000000000188)); // expected result + __ movq(r9, uint64_t{0x0000000000000188}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ bzhiq(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000000000000188)); // expected result + __ movq(r9, uint64_t{0x0000000000000188}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ bzhil(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000000000000188)); // expected result + __ movq(r9, uint64_t{0x0000000000000188}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ bzhil(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000000000000188)); // expected result + __ movq(r9, uint64_t{0x0000000000000188}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // mulx - __ movq(rdx, V8_UINT64_C(0x0000000000001000)); + __ movq(rdx, uint64_t{0x0000000000001000}); __ incq(rax); __ mulxq(r8, r9, rcx); - __ movq(rbx, V8_UINT64_C(0x0000000000000112)); // expected result + __ movq(rbx, uint64_t{0x0000000000000112}); // expected result __ cmpq(r8, rbx); __ j(not_equal, &exit); - __ movq(rbx, V8_UINT64_C(0x2334455667788000)); // expected result + __ movq(rbx, uint64_t{0x2334455667788000}); // expected result __ cmpq(r9, rbx); __ j(not_equal, &exit); __ incq(rax); __ mulxq(r8, r9, Operand(rsp, 0)); - __ movq(rbx, V8_UINT64_C(0x0000000000000112)); // expected result + __ movq(rbx, uint64_t{0x0000000000000112}); // expected result __ cmpq(r8, rbx); __ j(not_equal, &exit); - __ movq(rbx, V8_UINT64_C(0x2334455667788000)); // expected result + __ movq(rbx, uint64_t{0x2334455667788000}); // expected result __ cmpq(r9, rbx); __ j(not_equal, &exit); __ incq(rax); __ mulxl(r8, r9, rcx); - __ movq(rbx, V8_UINT64_C(0x0000000000000556)); // expected result + __ movq(rbx, uint64_t{0x0000000000000556}); // expected result __ cmpq(r8, rbx); __ j(not_equal, &exit); - __ movq(rbx, V8_UINT64_C(0x0000000067788000)); // expected result + __ movq(rbx, uint64_t{0x0000000067788000}); // expected result __ cmpq(r9, rbx); __ j(not_equal, &exit); __ incq(rax); __ mulxl(r8, r9, Operand(rsp, 0)); - __ movq(rbx, V8_UINT64_C(0x0000000000000556)); // expected result + __ movq(rbx, uint64_t{0x0000000000000556}); // expected result __ cmpq(r8, rbx); __ j(not_equal, &exit); - __ movq(rbx, V8_UINT64_C(0x0000000067788000)); // expected result + __ movq(rbx, uint64_t{0x0000000067788000}); // expected result __ cmpq(r9, rbx); __ j(not_equal, &exit); // pdep - __ movq(rdx, V8_UINT64_C(0xfffffffffffffff0)); + __ movq(rdx, uint64_t{0xfffffffffffffff0}); __ incq(rax); __ pdepq(r8, rdx, rcx); - __ movq(r9, V8_UINT64_C(0x1122334455667400)); // expected result + __ movq(r9, uint64_t{0x1122334455667400}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ pdepq(r8, rdx, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x1122334455667400)); // expected result + __ movq(r9, uint64_t{0x1122334455667400}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ pdepl(r8, rdx, rcx); - __ movq(r9, V8_UINT64_C(0x0000000055667400)); // expected result + __ movq(r9, uint64_t{0x0000000055667400}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ pdepl(r8, rdx, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000055667400)); // expected result + __ movq(r9, uint64_t{0x0000000055667400}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // pext - __ movq(rdx, V8_UINT64_C(0xfffffffffffffff0)); + __ movq(rdx, uint64_t{0xfffffffffffffff0}); __ incq(rax); __ pextq(r8, rdx, rcx); - __ movq(r9, V8_UINT64_C(0x0000000003fffffe)); // expected result + __ movq(r9, uint64_t{0x0000000003fffffe}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ pextq(r8, rdx, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x0000000003fffffe)); // expected result + __ movq(r9, uint64_t{0x0000000003fffffe}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ pextl(r8, rdx, rcx); - __ movq(r9, V8_UINT64_C(0x000000000000fffe)); // expected result + __ movq(r9, uint64_t{0x000000000000fffe}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ pextl(r8, rdx, Operand(rsp, 0)); - __ movq(r9, V8_UINT64_C(0x000000000000fffe)); // expected result + __ movq(r9, uint64_t{0x000000000000fffe}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // sarx - __ movq(rdx, V8_UINT64_C(0x0000000000000004)); + __ movq(rdx, uint64_t{0x0000000000000004}); __ incq(rax); __ sarxq(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0112233445566778)); // expected result + __ movq(r9, uint64_t{0x0112233445566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ sarxq(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0112233445566778)); // expected result + __ movq(r9, uint64_t{0x0112233445566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ sarxl(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000000005566778)); // expected result + __ movq(r9, uint64_t{0x0000000005566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ sarxl(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000000005566778)); // expected result + __ movq(r9, uint64_t{0x0000000005566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // shlx - __ movq(rdx, V8_UINT64_C(0x0000000000000004)); + __ movq(rdx, uint64_t{0x0000000000000004}); __ incq(rax); __ shlxq(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x1223344556677880)); // expected result + __ movq(r9, uint64_t{0x1223344556677880}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ shlxq(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x1223344556677880)); // expected result + __ movq(r9, uint64_t{0x1223344556677880}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ shlxl(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000000056677880)); // expected result + __ movq(r9, uint64_t{0x0000000056677880}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ shlxl(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000000056677880)); // expected result + __ movq(r9, uint64_t{0x0000000056677880}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // shrx - __ movq(rdx, V8_UINT64_C(0x0000000000000004)); + __ movq(rdx, uint64_t{0x0000000000000004}); __ incq(rax); __ shrxq(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0112233445566778)); // expected result + __ movq(r9, uint64_t{0x0112233445566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ shrxq(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0112233445566778)); // expected result + __ movq(r9, uint64_t{0x0112233445566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ shrxl(r8, rcx, rdx); - __ movq(r9, V8_UINT64_C(0x0000000005566778)); // expected result + __ movq(r9, uint64_t{0x0000000005566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ shrxl(r8, Operand(rsp, 0), rdx); - __ movq(r9, V8_UINT64_C(0x0000000005566778)); // expected result + __ movq(r9, uint64_t{0x0000000005566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); // rorx __ incq(rax); __ rorxq(r8, rcx, 0x4); - __ movq(r9, V8_UINT64_C(0x8112233445566778)); // expected result + __ movq(r9, uint64_t{0x8112233445566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ rorxq(r8, Operand(rsp, 0), 0x4); - __ movq(r9, V8_UINT64_C(0x8112233445566778)); // expected result + __ movq(r9, uint64_t{0x8112233445566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ rorxl(r8, rcx, 0x4); - __ movq(r9, V8_UINT64_C(0x0000000085566778)); // expected result + __ movq(r9, uint64_t{0x0000000085566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); __ incq(rax); __ rorxl(r8, Operand(rsp, 0), 0x4); - __ movq(r9, V8_UINT64_C(0x0000000085566778)); // expected result + __ movq(r9, uint64_t{0x0000000085566778}); // expected result __ cmpq(r8, r9); __ j(not_equal, &exit); @@ -2444,8 +2444,8 @@ TEST(AssemblerX64PslldWithXmm15) { CodeDesc desc; masm.GetCode(CcTest::i_isolate(), &desc); - uint64_t result = FUNCTION_CAST(buffer)(V8_UINT64_C(0x1122334455667788)); - CHECK_EQ(V8_UINT64_C(0x22446688aaccef10), result); + uint64_t result = FUNCTION_CAST(buffer)(uint64_t{0x1122334455667788}); + CHECK_EQ(uint64_t{0x22446688aaccef10}, result); } typedef float (*F9)(float x, float y); diff --git a/test/cctest/test-field-type-tracking.cc b/test/cctest/test-field-type-tracking.cc index 9622da53b8..8736c9c5db 100644 --- a/test/cctest/test-field-type-tracking.cc +++ b/test/cctest/test-field-type-tracking.cc @@ -2728,7 +2728,7 @@ TEST(HoleyMutableHeapNumber) { CHECK_EQ(kHoleNanInt64, mhn->value_as_bits()); mhn = isolate->factory()->NewHeapNumber(0.0, MUTABLE); - CHECK_EQ(V8_UINT64_C(0), mhn->value_as_bits()); + CHECK_EQ(uint64_t{0}, mhn->value_as_bits()); mhn->set_value_as_bits(kHoleNanInt64); CHECK_EQ(kHoleNanInt64, mhn->value_as_bits()); diff --git a/test/unittests/base/bits-unittest.cc b/test/unittests/base/bits-unittest.cc index 485dddf529..9df052e400 100644 --- a/test/unittests/base/bits-unittest.cc +++ b/test/unittests/base/bits-unittest.cc @@ -133,16 +133,16 @@ TEST(Bits, IsPowerOfTwo32) { TEST(Bits, IsPowerOfTwo64) { - EXPECT_FALSE(IsPowerOfTwo(V8_UINT64_C(0))); + EXPECT_FALSE(IsPowerOfTwo(uint64_t{0})); TRACED_FORRANGE(uint32_t, shift, 0, 63) { - EXPECT_TRUE(IsPowerOfTwo(V8_UINT64_C(1) << shift)); - EXPECT_FALSE(IsPowerOfTwo((V8_UINT64_C(1) << shift) + 5U)); - EXPECT_FALSE(IsPowerOfTwo(~(V8_UINT64_C(1) << shift))); + EXPECT_TRUE(IsPowerOfTwo(uint64_t{1} << shift)); + EXPECT_FALSE(IsPowerOfTwo((uint64_t{1} << shift) + 5U)); + EXPECT_FALSE(IsPowerOfTwo(~(uint64_t{1} << shift))); } TRACED_FORRANGE(uint32_t, shift, 2, 63) { - EXPECT_FALSE(IsPowerOfTwo((V8_UINT64_C(1) << shift) - 1U)); + EXPECT_FALSE(IsPowerOfTwo((uint64_t{1} << shift) - 1U)); } - EXPECT_FALSE(IsPowerOfTwo(V8_UINT64_C(0xffffffffffffffff))); + EXPECT_FALSE(IsPowerOfTwo(uint64_t{0xffffffffffffffff})); } @@ -206,7 +206,7 @@ TEST(Bits, RotateRight64) { } EXPECT_EQ(1u, RotateRight64(1, 0)); EXPECT_EQ(1u, RotateRight64(2, 1)); - EXPECT_EQ(V8_UINT64_C(0x8000000000000000), RotateRight64(1, 1)); + EXPECT_EQ(uint64_t{0x8000000000000000}, RotateRight64(1, 1)); } diff --git a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc index 92cdb4962c..78f8a803ca 100644 --- a/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc +++ b/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc @@ -1335,7 +1335,7 @@ TEST_F(InstructionSelectorTest, Word32EqualZeroAndBranchWithOneBitMask) { TEST_F(InstructionSelectorTest, Word64EqualZeroAndBranchWithOneBitMask) { TRACED_FORRANGE(int, bit, 0, 63) { - uint64_t mask = V8_UINT64_C(1) << bit; + uint64_t mask = uint64_t{1} << bit; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); RawMachineLabel a, b; m.Branch(m.Word64Equal(m.Word64And(m.Int64Constant(mask), m.Parameter(0)), @@ -1355,7 +1355,7 @@ TEST_F(InstructionSelectorTest, Word64EqualZeroAndBranchWithOneBitMask) { } TRACED_FORRANGE(int, bit, 0, 63) { - uint64_t mask = V8_UINT64_C(1) << bit; + uint64_t mask = uint64_t{1} << bit; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); RawMachineLabel a, b; m.Branch( @@ -3861,7 +3861,7 @@ TEST_F(InstructionSelectorTest, Word64ShrWithWord64AndWithImmediate) { uint64_t jnk = rng()->NextInt64(); jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0; uint64_t msk = - ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk; + ((uint64_t{0xffffffffffffffff} >> (64 - width)) << lsb) | jnk; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return(m.Word64Shr(m.Word64And(m.Parameter(0), m.Int64Constant(msk)), m.Int64Constant(shift))); @@ -3879,7 +3879,7 @@ TEST_F(InstructionSelectorTest, Word64ShrWithWord64AndWithImmediate) { uint64_t jnk = rng()->NextInt64(); jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0; uint64_t msk = - ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk; + ((uint64_t{0xffffffffffffffff} >> (64 - width)) << lsb) | jnk; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(msk), m.Parameter(0)), m.Int64Constant(shift))); @@ -3939,7 +3939,7 @@ TEST_F(InstructionSelectorTest, Word64AndWithImmediateWithWord64Shr) { TRACED_FORRANGE(int64_t, shift, -64, 127) { int64_t lsb = shift & 0x3f; TRACED_FORRANGE(int64_t, width, 1, 63) { - uint64_t msk = (V8_UINT64_C(1) << width) - 1; + uint64_t msk = (uint64_t{1} << width) - 1; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return(m.Word64And(m.Word64Shr(m.Parameter(0), m.Int64Constant(shift)), m.Int64Constant(msk))); @@ -3955,7 +3955,7 @@ TEST_F(InstructionSelectorTest, Word64AndWithImmediateWithWord64Shr) { TRACED_FORRANGE(int64_t, shift, -64, 127) { int64_t lsb = shift & 0x3f; TRACED_FORRANGE(int64_t, width, 1, 63) { - uint64_t msk = (V8_UINT64_C(1) << width) - 1; + uint64_t msk = (uint64_t{1} << width) - 1; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return( m.Word64And(m.Int64Constant(msk), diff --git a/test/unittests/compiler/machine-operator-reducer-unittest.cc b/test/unittests/compiler/machine-operator-reducer-unittest.cc index 1a4476f488..91b21f1249 100644 --- a/test/unittests/compiler/machine-operator-reducer-unittest.cc +++ b/test/unittests/compiler/machine-operator-reducer-unittest.cc @@ -1946,7 +1946,7 @@ TEST_F(MachineOperatorReducerTest, Float64InsertLowWord32WithConstant) { EXPECT_THAT( r.replacement(), IsFloat64Constant(BitEq(bit_cast( - (bit_cast(x) & V8_UINT64_C(0xFFFFFFFF00000000)) | y)))); + (bit_cast(x) & uint64_t{0xFFFFFFFF00000000}) | y)))); } } } @@ -1965,7 +1965,7 @@ TEST_F(MachineOperatorReducerTest, Float64InsertHighWord32WithConstant) { ASSERT_TRUE(r.Changed()); EXPECT_THAT(r.replacement(), IsFloat64Constant(BitEq(bit_cast( - (bit_cast(x) & V8_UINT64_C(0xFFFFFFFF)) | + (bit_cast(x) & uint64_t{0xFFFFFFFF}) | (static_cast(y) << 32))))); } } diff --git a/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc b/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc index 74af374379..1de64131e9 100644 --- a/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc +++ b/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc @@ -445,7 +445,7 @@ TEST_F(InstructionSelectorTest, Word64ShrWithWord64AndWithImmediate) { uint64_t jnk = rng()->NextInt64(); jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0; uint64_t msk = - ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk; + ((uint64_t{0xffffffffffffffff} >> (64 - width)) << lsb) | jnk; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return(m.Word64Shr(m.Word64And(m.Parameter(0), m.Int64Constant(msk)), m.Int64Constant(shift))); @@ -463,7 +463,7 @@ TEST_F(InstructionSelectorTest, Word64ShrWithWord64AndWithImmediate) { uint64_t jnk = rng()->NextInt64(); jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0; uint64_t msk = - ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk; + ((uint64_t{0xffffffffffffffff} >> (64 - width)) << lsb) | jnk; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(msk), m.Parameter(0)), m.Int64Constant(shift))); @@ -690,7 +690,7 @@ TEST_F(InstructionSelectorTest, Word64AndWithImmediateWithWord64Shr) { TRACED_FORRANGE(int64_t, shift, -64, 127) { int64_t lsb = shift & 0x3f; TRACED_FORRANGE(int64_t, width, 1, 63) { - uint64_t msk = (V8_UINT64_C(1) << width) - 1; + uint64_t msk = (uint64_t{1} << width) - 1; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return(m.Word64And(m.Word64Shr(m.Parameter(0), m.Int64Constant(shift)), m.Int64Constant(msk))); @@ -706,7 +706,7 @@ TEST_F(InstructionSelectorTest, Word64AndWithImmediateWithWord64Shr) { TRACED_FORRANGE(int64_t, shift, -64, 127) { int64_t lsb = shift & 0x3f; TRACED_FORRANGE(int64_t, width, 1, 63) { - uint64_t msk = (V8_UINT64_C(1) << width) - 1; + uint64_t msk = (uint64_t{1} << width) - 1; StreamBuilder m(this, MachineType::Int64(), MachineType::Int64()); m.Return( m.Word64And(m.Int64Constant(msk), diff --git a/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/test/unittests/compiler/simplified-operator-reducer-unittest.cc index 2e67c0d4df..e14874381b 100644 --- a/test/unittests/compiler/simplified-operator-reducer-unittest.cc +++ b/test/unittests/compiler/simplified-operator-reducer-unittest.cc @@ -92,11 +92,10 @@ const int32_t kInt32Values[] = { 1062628108, 1087581664, 1488498068, 1534668023, 1661587028, 1696896187, 1866841746, 2032089723, 2147483647}; - const double kNaNs[] = {-std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), - bit_cast(V8_UINT64_C(0x7FFFFFFFFFFFFFFF)), - bit_cast(V8_UINT64_C(0xFFFFFFFFFFFFFFFF))}; + bit_cast(uint64_t{0x7FFFFFFFFFFFFFFF}), + bit_cast(uint64_t{0xFFFFFFFFFFFFFFFF})}; const CheckForMinusZeroMode kCheckForMinusZeroModes[] = { CheckForMinusZeroMode::kDontCheckForMinusZero,