| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 | 330 |
| 331 void MacroAssembler::StoreRoot(Register source, | 331 void MacroAssembler::StoreRoot(Register source, |
| 332 Heap::RootListIndex index, | 332 Heap::RootListIndex index, |
| 333 Condition cond) { | 333 Condition cond) { |
| 334 str(source, MemOperand(roots, index << kPointerSizeLog2), cond); | 334 str(source, MemOperand(roots, index << kPointerSizeLog2), cond); |
| 335 } | 335 } |
| 336 | 336 |
| 337 | 337 |
| 338 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER |
| 338 void MacroAssembler::RecordWriteHelper(Register object, | 339 void MacroAssembler::RecordWriteHelper(Register object, |
| 339 Register address, | 340 Register address, |
| 340 Register scratch) { | 341 Register scratch) { |
| 341 if (FLAG_debug_code) { | 342 if (FLAG_debug_code) { |
| 342 // Check that the object is not in new space. | 343 // Check that the object is not in new space. |
| 343 Label not_in_new_space; | 344 Label not_in_new_space; |
| 344 InNewSpace(object, scratch, ne, ¬_in_new_space); | 345 InNewSpace(object, scratch, ne, ¬_in_new_space); |
| 345 Abort("new-space object passed to RecordWriteHelper"); | 346 Abort("new-space object passed to RecordWriteHelper"); |
| 346 bind(¬_in_new_space); | 347 bind(¬_in_new_space); |
| 347 } | 348 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 bind(&done); | 432 bind(&done); |
| 432 | 433 |
| 433 // Clobber all input registers when running with the debug-code flag | 434 // Clobber all input registers when running with the debug-code flag |
| 434 // turned on to provoke errors. | 435 // turned on to provoke errors. |
| 435 if (FLAG_debug_code) { | 436 if (FLAG_debug_code) { |
| 436 mov(object, Operand(BitCast<int32_t>(kZapValue))); | 437 mov(object, Operand(BitCast<int32_t>(kZapValue))); |
| 437 mov(address, Operand(BitCast<int32_t>(kZapValue))); | 438 mov(address, Operand(BitCast<int32_t>(kZapValue))); |
| 438 mov(scratch, Operand(BitCast<int32_t>(kZapValue))); | 439 mov(scratch, Operand(BitCast<int32_t>(kZapValue))); |
| 439 } | 440 } |
| 440 } | 441 } |
| 441 | 442 #endif |
| 442 | 443 |
| 443 // Push and pop all registers that can hold pointers. | 444 // Push and pop all registers that can hold pointers. |
| 444 void MacroAssembler::PushSafepointRegisters() { | 445 void MacroAssembler::PushSafepointRegisters() { |
| 445 // Safepoints expect a block of contiguous register values starting with r0: | 446 // Safepoints expect a block of contiguous register values starting with r0: |
| 446 ASSERT(((1 << kNumSafepointSavedRegisters) - 1) == kSafepointSavedRegisters); | 447 ASSERT(((1 << kNumSafepointSavedRegisters) - 1) == kSafepointSavedRegisters); |
| 447 // Safepoints expect a block of kNumSafepointRegisters values on the | 448 // Safepoints expect a block of kNumSafepointRegisters values on the |
| 448 // stack, so adjust the stack for unsaved registers. | 449 // stack, so adjust the stack for unsaved registers. |
| 449 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 450 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
| 450 ASSERT(num_unsaved >= 0); | 451 ASSERT(num_unsaved >= 0); |
| 451 sub(sp, sp, Operand(num_unsaved * kPointerSize)); | 452 sub(sp, sp, Operand(num_unsaved * kPointerSize)); |
| (...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 | 2108 |
| 2108 void CodePatcher::Emit(Address addr) { | 2109 void CodePatcher::Emit(Address addr) { |
| 2109 masm()->emit(reinterpret_cast<Instr>(addr)); | 2110 masm()->emit(reinterpret_cast<Instr>(addr)); |
| 2110 } | 2111 } |
| 2111 #endif // ENABLE_DEBUGGER_SUPPORT | 2112 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2112 | 2113 |
| 2113 | 2114 |
| 2114 } } // namespace v8::internal | 2115 } } // namespace v8::internal |
| 2115 | 2116 |
| 2116 #endif // V8_TARGET_ARCH_ARM | 2117 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |