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 3479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 // already at '+ 8' from the current instruction but return is after three | 3490 // already at '+ 8' from the current instruction but return is after three |
3491 // instructions so add another 4 to pc to get the return address. | 3491 // instructions so add another 4 to pc to get the return address. |
3492 { | 3492 { |
3493 // Prevent literal pool emission before return address. | 3493 // Prevent literal pool emission before return address. |
3494 Assembler::BlockConstPoolScope block_const_pool(masm); | 3494 Assembler::BlockConstPoolScope block_const_pool(masm); |
3495 masm->add(lr, pc, Operand(4)); | 3495 masm->add(lr, pc, Operand(4)); |
3496 __ str(lr, MemOperand(sp, 0)); | 3496 __ str(lr, MemOperand(sp, 0)); |
3497 masm->Jump(r5); | 3497 masm->Jump(r5); |
3498 } | 3498 } |
3499 | 3499 |
| 3500 __ VFPEnsureFPSCRState(r2); |
| 3501 |
3500 if (always_allocate) { | 3502 if (always_allocate) { |
3501 // It's okay to clobber r2 and r3 here. Don't mess with r0 and r1 | 3503 // It's okay to clobber r2 and r3 here. Don't mess with r0 and r1 |
3502 // though (contain the result). | 3504 // though (contain the result). |
3503 __ mov(r2, Operand(scope_depth)); | 3505 __ mov(r2, Operand(scope_depth)); |
3504 __ ldr(r3, MemOperand(r2)); | 3506 __ ldr(r3, MemOperand(r2)); |
3505 __ sub(r3, r3, Operand(1)); | 3507 __ sub(r3, r3, Operand(1)); |
3506 __ str(r3, MemOperand(r2)); | 3508 __ str(r3, MemOperand(r2)); |
3507 } | 3509 } |
3508 | 3510 |
3509 // check for failure result | 3511 // check for failure result |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3651 | 3653 |
3652 // Called from C, so do not pop argc and args on exit (preserve sp) | 3654 // Called from C, so do not pop argc and args on exit (preserve sp) |
3653 // No need to save register-passed args | 3655 // No need to save register-passed args |
3654 // Save callee-saved registers (incl. cp and fp), sp, and lr | 3656 // Save callee-saved registers (incl. cp and fp), sp, and lr |
3655 __ stm(db_w, sp, kCalleeSaved | lr.bit()); | 3657 __ stm(db_w, sp, kCalleeSaved | lr.bit()); |
3656 | 3658 |
3657 // Save callee-saved vfp registers. | 3659 // Save callee-saved vfp registers. |
3658 __ vstm(db_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg); | 3660 __ vstm(db_w, sp, kFirstCalleeSavedDoubleReg, kLastCalleeSavedDoubleReg); |
3659 // Set up the reserved register for 0.0. | 3661 // Set up the reserved register for 0.0. |
3660 __ vmov(kDoubleRegZero, 0.0); | 3662 __ vmov(kDoubleRegZero, 0.0); |
| 3663 __ VFPEnsureFPSCRState(r4); |
3661 | 3664 |
3662 // Get address of argv, see stm above. | 3665 // Get address of argv, see stm above. |
3663 // r0: code entry | 3666 // r0: code entry |
3664 // r1: function | 3667 // r1: function |
3665 // r2: receiver | 3668 // r2: receiver |
3666 // r3: argc | 3669 // r3: argc |
3667 | 3670 |
3668 // Set up argv in r4. | 3671 // Set up argv in r4. |
3669 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize; | 3672 int offset_to_argv = (kNumCalleeSaved + 1) * kPointerSize; |
3670 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize; | 3673 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize; |
(...skipping 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6832 | 6835 |
6833 // Push return address (accessible to GC through exit frame pc). | 6836 // Push return address (accessible to GC through exit frame pc). |
6834 // Note that using pc with str is deprecated. | 6837 // Note that using pc with str is deprecated. |
6835 Label start; | 6838 Label start; |
6836 __ bind(&start); | 6839 __ bind(&start); |
6837 __ add(ip, pc, Operand(Assembler::kInstrSize)); | 6840 __ add(ip, pc, Operand(Assembler::kInstrSize)); |
6838 __ str(ip, MemOperand(sp, 0)); | 6841 __ str(ip, MemOperand(sp, 0)); |
6839 __ Jump(target); // Call the C++ function. | 6842 __ Jump(target); // Call the C++ function. |
6840 ASSERT_EQ(Assembler::kInstrSize + Assembler::kPcLoadDelta, | 6843 ASSERT_EQ(Assembler::kInstrSize + Assembler::kPcLoadDelta, |
6841 masm->SizeOfCodeGeneratedSince(&start)); | 6844 masm->SizeOfCodeGeneratedSince(&start)); |
| 6845 __ VFPEnsureFPSCRState(r2); |
6842 } | 6846 } |
6843 | 6847 |
6844 | 6848 |
6845 void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, | 6849 void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, |
6846 Label* miss, | 6850 Label* miss, |
6847 Label* done, | 6851 Label* done, |
6848 Register receiver, | 6852 Register receiver, |
6849 Register properties, | 6853 Register properties, |
6850 Handle<Name> name, | 6854 Handle<Name> name, |
6851 Register scratch0) { | 6855 Register scratch0) { |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7432 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 7436 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
7433 __ add(r6, r5, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); | 7437 __ add(r6, r5, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); |
7434 __ str(r0, FieldMemOperand(r6, FixedArray::kHeaderSize)); | 7438 __ str(r0, FieldMemOperand(r6, FixedArray::kHeaderSize)); |
7435 __ Ret(); | 7439 __ Ret(); |
7436 | 7440 |
7437 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. | 7441 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. |
7438 __ bind(&double_elements); | 7442 __ bind(&double_elements); |
7439 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 7443 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
7440 __ StoreNumberToDoubleElements(r0, r3, | 7444 __ StoreNumberToDoubleElements(r0, r3, |
7441 // Overwrites all regs after this. | 7445 // Overwrites all regs after this. |
7442 r5, r6, r7, r9, r2, | 7446 r5, r9, r6, r7, r2, |
7443 &slow_elements); | 7447 &slow_elements); |
7444 __ Ret(); | 7448 __ Ret(); |
7445 } | 7449 } |
7446 | 7450 |
7447 | 7451 |
7448 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 7452 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
7449 CEntryStub ces(1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); | 7453 CEntryStub ces(1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); |
7450 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); | 7454 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); |
7451 int parameter_count_offset = | 7455 int parameter_count_offset = |
7452 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 7456 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7518 | 7522 |
7519 __ Pop(lr, r5, r1); | 7523 __ Pop(lr, r5, r1); |
7520 __ Ret(); | 7524 __ Ret(); |
7521 } | 7525 } |
7522 | 7526 |
7523 #undef __ | 7527 #undef __ |
7524 | 7528 |
7525 } } // namespace v8::internal | 7529 } } // namespace v8::internal |
7526 | 7530 |
7527 #endif // V8_TARGET_ARCH_ARM | 7531 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |