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_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 argument_count); | 755 argument_count); |
756 if (save_doubles()) { | 756 if (save_doubles()) { |
757 __ RestoreFPRegs(sp, scratch); | 757 __ RestoreFPRegs(sp, scratch); |
758 } | 758 } |
759 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). | 759 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). |
760 } | 760 } |
761 | 761 |
762 | 762 |
763 void MathPowStub::Generate(MacroAssembler* masm) { | 763 void MathPowStub::Generate(MacroAssembler* masm) { |
764 const Register base = r1; | 764 const Register base = r1; |
765 const Register exponent = r2; | 765 const Register exponent = MathPowTaggedDescriptor::exponent(); |
| 766 DCHECK(exponent.is(r2)); |
766 const Register heapnumbermap = r5; | 767 const Register heapnumbermap = r5; |
767 const Register heapnumber = r0; | 768 const Register heapnumber = r0; |
768 const DwVfpRegister double_base = d0; | 769 const DwVfpRegister double_base = d0; |
769 const DwVfpRegister double_exponent = d1; | 770 const DwVfpRegister double_exponent = d1; |
770 const DwVfpRegister double_result = d2; | 771 const DwVfpRegister double_result = d2; |
771 const DwVfpRegister double_scratch = d3; | 772 const DwVfpRegister double_scratch = d3; |
772 const SwVfpRegister single_scratch = s6; | 773 const SwVfpRegister single_scratch = s6; |
773 const Register scratch = r9; | 774 const Register scratch = r9; |
774 const Register scratch2 = r4; | 775 const Register scratch2 = r4; |
775 | 776 |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 PropertyAccessCompiler::TailCallBuiltin( | 1500 PropertyAccessCompiler::TailCallBuiltin( |
1500 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 1501 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
1501 } | 1502 } |
1502 | 1503 |
1503 | 1504 |
1504 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 1505 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
1505 // The displacement is the offset of the last parameter (if any) | 1506 // The displacement is the offset of the last parameter (if any) |
1506 // relative to the frame pointer. | 1507 // relative to the frame pointer. |
1507 const int kDisplacement = | 1508 const int kDisplacement = |
1508 StandardFrameConstants::kCallerSPOffset - kPointerSize; | 1509 StandardFrameConstants::kCallerSPOffset - kPointerSize; |
| 1510 DCHECK(r1.is(ArgumentsAccessReadDescriptor::index())); |
| 1511 DCHECK(r0.is(ArgumentsAccessReadDescriptor::parameter_count())); |
1509 | 1512 |
1510 // Check that the key is a smi. | 1513 // Check that the key is a smi. |
1511 Label slow; | 1514 Label slow; |
1512 __ JumpIfNotSmi(r1, &slow); | 1515 __ JumpIfNotSmi(r1, &slow); |
1513 | 1516 |
1514 // Check if the calling frame is an arguments adaptor frame. | 1517 // Check if the calling frame is an arguments adaptor frame. |
1515 Label adaptor; | 1518 Label adaptor; |
1516 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 1519 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
1517 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); | 1520 __ ldr(r3, MemOperand(r2, StandardFrameConstants::kContextOffset)); |
1518 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 1521 __ cmp(r3, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
(...skipping 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4613 | 4616 |
4614 | 4617 |
4615 void CallApiGetterStub::Generate(MacroAssembler* masm) { | 4618 void CallApiGetterStub::Generate(MacroAssembler* masm) { |
4616 // ----------- S t a t e ------------- | 4619 // ----------- S t a t e ------------- |
4617 // -- sp[0] : name | 4620 // -- sp[0] : name |
4618 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object | 4621 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object |
4619 // -- ... | 4622 // -- ... |
4620 // -- r2 : api_function_address | 4623 // -- r2 : api_function_address |
4621 // ----------------------------------- | 4624 // ----------------------------------- |
4622 | 4625 |
4623 Register api_function_address = r2; | 4626 Register api_function_address = ApiGetterDescriptor::function_address(); |
| 4627 DCHECK(api_function_address.is(r2)); |
4624 | 4628 |
4625 __ mov(r0, sp); // r0 = Handle<Name> | 4629 __ mov(r0, sp); // r0 = Handle<Name> |
4626 __ add(r1, r0, Operand(1 * kPointerSize)); // r1 = PCA | 4630 __ add(r1, r0, Operand(1 * kPointerSize)); // r1 = PCA |
4627 | 4631 |
4628 const int kApiStackSpace = 1; | 4632 const int kApiStackSpace = 1; |
4629 FrameScope frame_scope(masm, StackFrame::MANUAL); | 4633 FrameScope frame_scope(masm, StackFrame::MANUAL); |
4630 __ EnterExitFrame(false, kApiStackSpace); | 4634 __ EnterExitFrame(false, kApiStackSpace); |
4631 | 4635 |
4632 // Create PropertyAccessorInfo instance on the stack above the exit frame with | 4636 // Create PropertyAccessorInfo instance on the stack above the exit frame with |
4633 // r1 (internal::Object** args_) as the data. | 4637 // r1 (internal::Object** args_) as the data. |
(...skipping 10 matching lines...) Expand all Loading... |
4644 MemOperand(fp, 6 * kPointerSize), | 4648 MemOperand(fp, 6 * kPointerSize), |
4645 NULL); | 4649 NULL); |
4646 } | 4650 } |
4647 | 4651 |
4648 | 4652 |
4649 #undef __ | 4653 #undef __ |
4650 | 4654 |
4651 } } // namespace v8::internal | 4655 } } // namespace v8::internal |
4652 | 4656 |
4653 #endif // V8_TARGET_ARCH_ARM | 4657 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |