| Index: src/x64/codegen-x64.cc
|
| diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
|
| index 642e11f44173dae8238e11128fd23ca9ce0bbe80..406c1bb593ebeb43c88c9aa39e5639e26ee019ce 100644
|
| --- a/src/x64/codegen-x64.cc
|
| +++ b/src/x64/codegen-x64.cc
|
| @@ -6438,8 +6438,13 @@ void CodeGenerator::GenerateRandomHeapNumber(
|
|
|
| // Return a random uint32 number in rax.
|
| // The fresh HeapNumber is in rbx, which is callee-save on both x64 ABIs.
|
| - __ PrepareCallCFunction(0);
|
| - __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 0);
|
| + __ PrepareCallCFunction(1);
|
| +#ifdef _WIN64
|
| + __ LoadAddress(rcx, ExternalReference::isolate_address());
|
| +#else
|
| + __ LoadAddress(rdi, ExternalReference::isolate_address());
|
| +#endif
|
| + __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1);
|
|
|
| // Convert 32 random bits in rax to 0.(32 random bits) in a double
|
| // by computing:
|
|
|