| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2955 Register global_object = rcx; | 2955 Register global_object = rcx; |
| 2956 #else | 2956 #else |
| 2957 ASSERT(ToRegister(instr->InputAt(0)).is(rdi)); | 2957 ASSERT(ToRegister(instr->InputAt(0)).is(rdi)); |
| 2958 Register global_object = rdi; | 2958 Register global_object = rdi; |
| 2959 #endif | 2959 #endif |
| 2960 | 2960 |
| 2961 __ PrepareCallCFunction(1); | 2961 __ PrepareCallCFunction(1); |
| 2962 __ movq(global_object, | 2962 __ movq(global_object, |
| 2963 FieldOperand(global_object, GlobalObject::kGlobalContextOffset)); | 2963 FieldOperand(global_object, GlobalObject::kGlobalContextOffset)); |
| 2964 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); | 2964 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); |
| 2965 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 2965 | 2966 |
| 2966 // Convert 32 random bits in rax to 0.(32 random bits) in a double | 2967 // Convert 32 random bits in rax to 0.(32 random bits) in a double |
| 2967 // by computing: | 2968 // by computing: |
| 2968 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). | 2969 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). |
| 2969 __ movl(rcx, Immediate(0x49800000)); // 1.0 x 2^20 as single. | 2970 __ movl(rcx, Immediate(0x49800000)); // 1.0 x 2^20 as single. |
| 2970 __ movd(xmm2, rcx); | 2971 __ movd(xmm2, rcx); |
| 2971 __ movd(xmm1, rax); | 2972 __ movd(xmm1, rax); |
| 2972 __ cvtss2sd(xmm2, xmm2); | 2973 __ cvtss2sd(xmm2, xmm2); |
| 2973 __ xorps(xmm1, xmm2); | 2974 __ xorps(xmm1, xmm2); |
| 2974 __ subsd(xmm1, xmm2); | 2975 __ subsd(xmm1, xmm2); |
| (...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4396 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4397 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
| 4397 ASSERT(osr_pc_offset_ == -1); | 4398 ASSERT(osr_pc_offset_ == -1); |
| 4398 osr_pc_offset_ = masm()->pc_offset(); | 4399 osr_pc_offset_ = masm()->pc_offset(); |
| 4399 } | 4400 } |
| 4400 | 4401 |
| 4401 #undef __ | 4402 #undef __ |
| 4402 | 4403 |
| 4403 } } // namespace v8::internal | 4404 } } // namespace v8::internal |
| 4404 | 4405 |
| 4405 #endif // V8_TARGET_ARCH_X64 | 4406 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |