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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 | 460 |
461 | 461 |
462 void MacroAssembler::PopSafepointRegisters() { | 462 void MacroAssembler::PopSafepointRegisters() { |
463 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 463 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
464 ldm(ia_w, sp, kSafepointSavedRegisters); | 464 ldm(ia_w, sp, kSafepointSavedRegisters); |
465 add(sp, sp, Operand(num_unsaved * kPointerSize)); | 465 add(sp, sp, Operand(num_unsaved * kPointerSize)); |
466 } | 466 } |
467 | 467 |
468 | 468 |
| 469 void MacroAssembler::PushSafepointRegistersAndDoubles() { |
| 470 PushSafepointRegisters(); |
| 471 sub(sp, sp, Operand(DwVfpRegister::kNumAllocatableRegisters * |
| 472 kDoubleSize)); |
| 473 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; i++) { |
| 474 vstr(DwVfpRegister::FromAllocationIndex(i), sp, i * kDoubleSize); |
| 475 } |
| 476 } |
| 477 |
| 478 |
| 479 void MacroAssembler::PopSafepointRegistersAndDoubles() { |
| 480 for (int i = 0; i < DwVfpRegister::kNumAllocatableRegisters; i++) { |
| 481 vldr(DwVfpRegister::FromAllocationIndex(i), sp, i * kDoubleSize); |
| 482 } |
| 483 add(sp, sp, Operand(DwVfpRegister::kNumAllocatableRegisters * |
| 484 kDoubleSize)); |
| 485 PopSafepointRegisters(); |
| 486 } |
| 487 |
469 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { | 488 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { |
470 // The registers are pushed starting with the highest encoding, | 489 // The registers are pushed starting with the highest encoding, |
471 // which means that lowest encodings are closest to the stack pointer. | 490 // which means that lowest encodings are closest to the stack pointer. |
472 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); | 491 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); |
473 return reg_code; | 492 return reg_code; |
474 } | 493 } |
475 | 494 |
476 | 495 |
477 void MacroAssembler::Ldrd(Register dst1, Register dst2, | 496 void MacroAssembler::Ldrd(Register dst1, Register dst2, |
478 const MemOperand& src, Condition cond) { | 497 const MemOperand& src, Condition cond) { |
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2196 | 2215 |
2197 void CodePatcher::Emit(Address addr) { | 2216 void CodePatcher::Emit(Address addr) { |
2198 masm()->emit(reinterpret_cast<Instr>(addr)); | 2217 masm()->emit(reinterpret_cast<Instr>(addr)); |
2199 } | 2218 } |
2200 #endif // ENABLE_DEBUGGER_SUPPORT | 2219 #endif // ENABLE_DEBUGGER_SUPPORT |
2201 | 2220 |
2202 | 2221 |
2203 } } // namespace v8::internal | 2222 } } // namespace v8::internal |
2204 | 2223 |
2205 #endif // V8_TARGET_ARCH_ARM | 2224 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |