| 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 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1644 | 1644 |
| 1645 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { | 1645 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
| 1646 // We don't allow a GC during a store buffer overflow so there is no need to | 1646 // We don't allow a GC during a store buffer overflow so there is no need to |
| 1647 // store the registers in any particular way, but we do have to store and | 1647 // store the registers in any particular way, but we do have to store and |
| 1648 // restore them. | 1648 // restore them. |
| 1649 __ stm(db_w, sp, kCallerSaved | lr.bit()); | 1649 __ stm(db_w, sp, kCallerSaved | lr.bit()); |
| 1650 | 1650 |
| 1651 const Register scratch = r1; | 1651 const Register scratch = r1; |
| 1652 | 1652 |
| 1653 if (save_doubles_ == kSaveFPRegs) { | 1653 if (save_doubles_ == kSaveFPRegs) { |
| 1654 // Check CPU flags for number of registers, setting the Z condition flag. | 1654 __ SaveFPRegs(sp, scratch); |
| 1655 __ CheckFor32DRegs(scratch); | |
| 1656 | |
| 1657 __ sub(sp, sp, Operand(kDoubleSize * DwVfpRegister::kMaxNumRegisters)); | |
| 1658 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; i++) { | |
| 1659 DwVfpRegister reg = DwVfpRegister::from_code(i); | |
| 1660 __ vstr(reg, MemOperand(sp, i * kDoubleSize), i < 16 ? al : ne); | |
| 1661 } | |
| 1662 } | 1655 } |
| 1663 const int argument_count = 1; | 1656 const int argument_count = 1; |
| 1664 const int fp_argument_count = 0; | 1657 const int fp_argument_count = 0; |
| 1665 | 1658 |
| 1666 AllowExternalCallThatCantCauseGC scope(masm); | 1659 AllowExternalCallThatCantCauseGC scope(masm); |
| 1667 __ PrepareCallCFunction(argument_count, fp_argument_count, scratch); | 1660 __ PrepareCallCFunction(argument_count, fp_argument_count, scratch); |
| 1668 __ mov(r0, Operand(ExternalReference::isolate_address())); | 1661 __ mov(r0, Operand(ExternalReference::isolate_address())); |
| 1669 __ CallCFunction( | 1662 __ CallCFunction( |
| 1670 ExternalReference::store_buffer_overflow_function(masm->isolate()), | 1663 ExternalReference::store_buffer_overflow_function(masm->isolate()), |
| 1671 argument_count); | 1664 argument_count); |
| 1672 if (save_doubles_ == kSaveFPRegs) { | 1665 if (save_doubles_ == kSaveFPRegs) { |
| 1673 // Check CPU flags for number of registers, setting the Z condition flag. | 1666 __ RestoreFPRegs(sp, scratch); |
| 1674 __ CheckFor32DRegs(scratch); | |
| 1675 | |
| 1676 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; i++) { | |
| 1677 DwVfpRegister reg = DwVfpRegister::from_code(i); | |
| 1678 __ vldr(reg, MemOperand(sp, i * kDoubleSize), i < 16 ? al : ne); | |
| 1679 } | |
| 1680 __ add(sp, sp, Operand(kDoubleSize * DwVfpRegister::kMaxNumRegisters)); | |
| 1681 } | 1667 } |
| 1682 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). | 1668 __ ldm(ia_w, sp, kCallerSaved | pc.bit()); // Also pop pc to get Ret(0). |
| 1683 } | 1669 } |
| 1684 | 1670 |
| 1685 | 1671 |
| 1686 void UnaryOpStub::PrintName(StringStream* stream) { | 1672 void UnaryOpStub::PrintName(StringStream* stream) { |
| 1687 const char* op_name = Token::Name(op_); | 1673 const char* op_name = Token::Name(op_); |
| 1688 const char* overwrite_name = NULL; // Make g++ happy. | 1674 const char* overwrite_name = NULL; // Make g++ happy. |
| 1689 switch (mode_) { | 1675 switch (mode_) { |
| 1690 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; | 1676 case UNARY_NO_OVERWRITE: overwrite_name = "Alloc"; break; |
| (...skipping 5496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7187 } | 7173 } |
| 7188 } | 7174 } |
| 7189 return false; | 7175 return false; |
| 7190 } | 7176 } |
| 7191 | 7177 |
| 7192 | 7178 |
| 7193 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( | 7179 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( |
| 7194 Isolate* isolate) { | 7180 Isolate* isolate) { |
| 7195 StoreBufferOverflowStub stub1(kDontSaveFPRegs); | 7181 StoreBufferOverflowStub stub1(kDontSaveFPRegs); |
| 7196 stub1.GetCode(isolate)->set_is_pregenerated(true); | 7182 stub1.GetCode(isolate)->set_is_pregenerated(true); |
| 7183 // Hydrogen code stubs need stub2 at snapshot time. |
| 7184 StoreBufferOverflowStub stub2(kSaveFPRegs); |
| 7185 stub2.GetCode(isolate)->set_is_pregenerated(true); |
| 7197 } | 7186 } |
| 7198 | 7187 |
| 7199 | 7188 |
| 7200 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime(Isolate* isolate) { | 7189 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime(Isolate* isolate) { |
| 7201 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 7190 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
| 7202 !entry->object.is(no_reg); | 7191 !entry->object.is(no_reg); |
| 7203 entry++) { | 7192 entry++) { |
| 7204 RecordWriteStub stub(entry->object, | 7193 RecordWriteStub stub(entry->object, |
| 7205 entry->value, | 7194 entry->value, |
| 7206 entry->address, | 7195 entry->address, |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7550 | 7539 |
| 7551 __ Pop(lr, r5, r1); | 7540 __ Pop(lr, r5, r1); |
| 7552 __ Ret(); | 7541 __ Ret(); |
| 7553 } | 7542 } |
| 7554 | 7543 |
| 7555 #undef __ | 7544 #undef __ |
| 7556 | 7545 |
| 7557 } } // namespace v8::internal | 7546 } } // namespace v8::internal |
| 7558 | 7547 |
| 7559 #endif // V8_TARGET_ARCH_ARM | 7548 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |