Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 1d9b8fffc2ba31442de8df8b9edddc25620ef549..d2775129e40fde3de16ddc5e49174c4e261f6ed5 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -2658,9 +2658,12 @@ void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { |
// The fresh HeapNumber is in rbx, which is callee-save on both x64 ABIs. |
__ PrepareCallCFunction(1); |
#ifdef _WIN64 |
- __ LoadAddress(rcx, ExternalReference::isolate_address()); |
+ __ movq(rcx, ContextOperand(context_register(), Context::GLOBAL_INDEX)); |
+ __ movq(rcx, FieldOperand(rcx, GlobalObject::kGlobalContextOffset)); |
+ |
#else |
- __ LoadAddress(rdi, ExternalReference::isolate_address()); |
+ __ movq(rdi, ContextOperand(context_register(), Context::GLOBAL_INDEX)); |
+ __ movq(rdi, FieldOperand(rdi, GlobalObject::kGlobalContextOffset)); |
#endif |
__ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); |