| 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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 push(rsi); | 1435 push(rsi); |
| 1436 push(rdi); | 1436 push(rdi); |
| 1437 push(r8); | 1437 push(r8); |
| 1438 push(r9); | 1438 push(r9); |
| 1439 // r10 is kScratchRegister. | 1439 // r10 is kScratchRegister. |
| 1440 push(r11); | 1440 push(r11); |
| 1441 push(r12); | 1441 push(r12); |
| 1442 // r13 is kRootRegister. | 1442 // r13 is kRootRegister. |
| 1443 push(r14); | 1443 push(r14); |
| 1444 // r15 is kSmiConstantRegister | 1444 // r15 is kSmiConstantRegister |
| 1445 STATIC_ASSERT(11 == kRegistersPushedByPushad); |
| 1445 } | 1446 } |
| 1446 | 1447 |
| 1447 | 1448 |
| 1448 void MacroAssembler::Popad() { | 1449 void MacroAssembler::Popad() { |
| 1449 pop(r14); | 1450 pop(r14); |
| 1450 pop(r12); | 1451 pop(r12); |
| 1451 pop(r11); | 1452 pop(r11); |
| 1452 pop(r9); | 1453 pop(r9); |
| 1453 pop(r8); | 1454 pop(r8); |
| 1454 pop(rdi); | 1455 pop(rdi); |
| 1455 pop(rsi); | 1456 pop(rsi); |
| 1456 pop(rbx); | 1457 pop(rbx); |
| 1457 pop(rdx); | 1458 pop(rdx); |
| 1458 pop(rcx); | 1459 pop(rcx); |
| 1459 pop(rax); | 1460 pop(rax); |
| 1460 } | 1461 } |
| 1461 | 1462 |
| 1462 | 1463 |
| 1463 void MacroAssembler::Dropad() { | 1464 void MacroAssembler::Dropad() { |
| 1464 const int kRegistersPushedByPushad = 11; | |
| 1465 addq(rsp, Immediate(kRegistersPushedByPushad * kPointerSize)); | 1465 addq(rsp, Immediate(kRegistersPushedByPushad * kPointerSize)); |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 | 1468 |
| 1469 // Order general registers are pushed by Pushad: | 1469 // Order general registers are pushed by Pushad: |
| 1470 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14. | 1470 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14. |
| 1471 int MacroAssembler::kSafepointPushRegisterIndices[Register::kNumRegisters] = { | 1471 int MacroAssembler::kSafepointPushRegisterIndices[Register::kNumRegisters] = { |
| 1472 0, | 1472 0, |
| 1473 1, | 1473 1, |
| 1474 2, | 1474 2, |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2501 CPU::FlushICache(address_, size_); | 2501 CPU::FlushICache(address_, size_); |
| 2502 | 2502 |
| 2503 // Check that the code was patched as expected. | 2503 // Check that the code was patched as expected. |
| 2504 ASSERT(masm_.pc_ == address_ + size_); | 2504 ASSERT(masm_.pc_ == address_ + size_); |
| 2505 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2505 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2506 } | 2506 } |
| 2507 | 2507 |
| 2508 } } // namespace v8::internal | 2508 } } // namespace v8::internal |
| 2509 | 2509 |
| 2510 #endif // V8_TARGET_ARCH_X64 | 2510 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |