| 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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" | 
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" | 
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" | 
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" | 
| (...skipping 3870 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3881   __ vadd(result, input, kDoubleRegZero); | 3881   __ vadd(result, input, kDoubleRegZero); | 
| 3882   __ vsqrt(result, result); | 3882   __ vsqrt(result, result); | 
| 3883   __ bind(&done); | 3883   __ bind(&done); | 
| 3884 } | 3884 } | 
| 3885 | 3885 | 
| 3886 | 3886 | 
| 3887 void LCodeGen::DoPower(LPower* instr) { | 3887 void LCodeGen::DoPower(LPower* instr) { | 
| 3888   Representation exponent_type = instr->hydrogen()->right()->representation(); | 3888   Representation exponent_type = instr->hydrogen()->right()->representation(); | 
| 3889   // Having marked this as a call, we can use any registers. | 3889   // Having marked this as a call, we can use any registers. | 
| 3890   // Just make sure that the input/output registers are the expected ones. | 3890   // Just make sure that the input/output registers are the expected ones. | 
|  | 3891   Register tagged_exponent = MathPowTaggedDescriptor::exponent(); | 
| 3891   DCHECK(!instr->right()->IsDoubleRegister() || | 3892   DCHECK(!instr->right()->IsDoubleRegister() || | 
| 3892          ToDoubleRegister(instr->right()).is(d1)); | 3893          ToDoubleRegister(instr->right()).is(d1)); | 
| 3893   DCHECK(!instr->right()->IsRegister() || | 3894   DCHECK(!instr->right()->IsRegister() || | 
| 3894          ToRegister(instr->right()).is(r2)); | 3895          ToRegister(instr->right()).is(tagged_exponent)); | 
| 3895   DCHECK(ToDoubleRegister(instr->left()).is(d0)); | 3896   DCHECK(ToDoubleRegister(instr->left()).is(d0)); | 
| 3896   DCHECK(ToDoubleRegister(instr->result()).is(d2)); | 3897   DCHECK(ToDoubleRegister(instr->result()).is(d2)); | 
| 3897 | 3898 | 
| 3898   if (exponent_type.IsSmi()) { | 3899   if (exponent_type.IsSmi()) { | 
| 3899     MathPowStub stub(isolate(), MathPowStub::TAGGED); | 3900     MathPowStub stub(isolate(), MathPowStub::TAGGED); | 
| 3900     __ CallStub(&stub); | 3901     __ CallStub(&stub); | 
| 3901   } else if (exponent_type.IsTagged()) { | 3902   } else if (exponent_type.IsTagged()) { | 
| 3902     Label no_deopt; | 3903     Label no_deopt; | 
| 3903     __ JumpIfSmi(r2, &no_deopt); | 3904     __ JumpIfSmi(tagged_exponent, &no_deopt); | 
| 3904     __ ldr(r6, FieldMemOperand(r2, HeapObject::kMapOffset)); | 3905     DCHECK(!r6.is(tagged_exponent)); | 
|  | 3906     __ ldr(r6, FieldMemOperand(tagged_exponent, HeapObject::kMapOffset)); | 
| 3905     __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); | 3907     __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); | 
| 3906     __ cmp(r6, Operand(ip)); | 3908     __ cmp(r6, Operand(ip)); | 
| 3907     DeoptimizeIf(ne, instr->environment()); | 3909     DeoptimizeIf(ne, instr->environment()); | 
| 3908     __ bind(&no_deopt); | 3910     __ bind(&no_deopt); | 
| 3909     MathPowStub stub(isolate(), MathPowStub::TAGGED); | 3911     MathPowStub stub(isolate(), MathPowStub::TAGGED); | 
| 3910     __ CallStub(&stub); | 3912     __ CallStub(&stub); | 
| 3911   } else if (exponent_type.IsInteger32()) { | 3913   } else if (exponent_type.IsInteger32()) { | 
| 3912     MathPowStub stub(isolate(), MathPowStub::INTEGER); | 3914     MathPowStub stub(isolate(), MathPowStub::INTEGER); | 
| 3913     __ CallStub(&stub); | 3915     __ CallStub(&stub); | 
| 3914   } else { | 3916   } else { | 
| (...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5908   __ Push(scope_info); | 5910   __ Push(scope_info); | 
| 5909   __ push(ToRegister(instr->function())); | 5911   __ push(ToRegister(instr->function())); | 
| 5910   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5912   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 
| 5911   RecordSafepoint(Safepoint::kNoLazyDeopt); | 5913   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
| 5912 } | 5914 } | 
| 5913 | 5915 | 
| 5914 | 5916 | 
| 5915 #undef __ | 5917 #undef __ | 
| 5916 | 5918 | 
| 5917 } }  // namespace v8::internal | 5919 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|