| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 4086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4097 __ bind(&done); | 4097 __ bind(&done); |
| 4098 X87LoadForUsage(input); | 4098 X87LoadForUsage(input); |
| 4099 __ fstp_d(FieldOperand(temp_result, HeapNumber::kValueOffset)); | 4099 __ fstp_d(FieldOperand(temp_result, HeapNumber::kValueOffset)); |
| 4100 | 4100 |
| 4101 { | 4101 { |
| 4102 // Preserve the value of all registers. | 4102 // Preserve the value of all registers. |
| 4103 PushSafepointRegistersScope scope(this); | 4103 PushSafepointRegistersScope scope(this); |
| 4104 | 4104 |
| 4105 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4105 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 4106 __ push(temp_result); | 4106 __ push(temp_result); |
| 4107 __ CallRuntimeSaveDoubles(Runtime::kMathSqrtRT); | 4107 __ CallRuntimeSaveDoubles(Runtime::kMathSqrt); |
| 4108 RecordSafepointWithRegisters(instr->pointer_map(), 1, | 4108 RecordSafepointWithRegisters(instr->pointer_map(), 1, |
| 4109 Safepoint::kNoLazyDeopt); | 4109 Safepoint::kNoLazyDeopt); |
| 4110 __ StoreToSafepointRegisterSlot(temp_result, eax); | 4110 __ StoreToSafepointRegisterSlot(temp_result, eax); |
| 4111 } | 4111 } |
| 4112 X87PrepareToWrite(result_reg); | 4112 X87PrepareToWrite(result_reg); |
| 4113 // return value of MathExpRT is Smi or Heap Number. | 4113 // return value of MathExpRT is Smi or Heap Number. |
| 4114 __ JumpIfSmi(temp_result, &smi); | 4114 __ JumpIfSmi(temp_result, &smi); |
| 4115 // Heap number(double) | 4115 // Heap number(double) |
| 4116 __ fld_d(FieldOperand(temp_result, HeapNumber::kValueOffset)); | 4116 __ fld_d(FieldOperand(temp_result, HeapNumber::kValueOffset)); |
| 4117 __ jmp(&finish); | 4117 __ jmp(&finish); |
| (...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6387 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6387 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6388 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6388 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6389 } | 6389 } |
| 6390 | 6390 |
| 6391 | 6391 |
| 6392 #undef __ | 6392 #undef __ |
| 6393 | 6393 |
| 6394 } } // namespace v8::internal | 6394 } } // namespace v8::internal |
| 6395 | 6395 |
| 6396 #endif // V8_TARGET_ARCH_X87 | 6396 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |