OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/frames.h" | 10 #include "src/frames.h" |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 | 1100 |
1101 // --------------------------------------------------------------------------- | 1101 // --------------------------------------------------------------------------- |
1102 // Exception handling | 1102 // Exception handling |
1103 | 1103 |
1104 // Push a new try handler and link it into try handler chain. | 1104 // Push a new try handler and link it into try handler chain. |
1105 void PushTryHandler(StackHandler::Kind kind, int handler_index); | 1105 void PushTryHandler(StackHandler::Kind kind, int handler_index); |
1106 | 1106 |
1107 // Unlink the stack handler on top of the stack from the try handler chain. | 1107 // Unlink the stack handler on top of the stack from the try handler chain. |
1108 void PopTryHandler(); | 1108 void PopTryHandler(); |
1109 | 1109 |
1110 // Activate the top handler in the try hander chain and pass the | |
1111 // thrown value. | |
1112 void Throw(Register value); | |
1113 | |
1114 // Propagate an uncatchable exception out of the current JS stack. | |
1115 void ThrowUncatchable(Register value); | |
1116 | |
1117 // --------------------------------------------------------------------------- | 1110 // --------------------------------------------------------------------------- |
1118 // Inline caching support | 1111 // Inline caching support |
1119 | 1112 |
1120 // Generate code for checking access rights - used for security checks | 1113 // Generate code for checking access rights - used for security checks |
1121 // on access to global objects across environments. The holder register | 1114 // on access to global objects across environments. The holder register |
1122 // is left untouched, but the scratch register and kScratchRegister, | 1115 // is left untouched, but the scratch register and kScratchRegister, |
1123 // which must be different, are clobbered. | 1116 // which must be different, are clobbered. |
1124 void CheckAccessGlobalProxy(Register holder_reg, | 1117 void CheckAccessGlobalProxy(Register holder_reg, |
1125 Register scratch, | 1118 Register scratch, |
1126 Label* miss); | 1119 Label* miss); |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 Label::Distance distance = Label::kFar); | 1515 Label::Distance distance = Label::kFar); |
1523 | 1516 |
1524 // Helper for finding the mark bits for an address. Afterwards, the | 1517 // Helper for finding the mark bits for an address. Afterwards, the |
1525 // bitmap register points at the word with the mark bits and the mask | 1518 // bitmap register points at the word with the mark bits and the mask |
1526 // the position of the first bit. Uses rcx as scratch and leaves addr_reg | 1519 // the position of the first bit. Uses rcx as scratch and leaves addr_reg |
1527 // unchanged. | 1520 // unchanged. |
1528 inline void GetMarkBits(Register addr_reg, | 1521 inline void GetMarkBits(Register addr_reg, |
1529 Register bitmap_reg, | 1522 Register bitmap_reg, |
1530 Register mask_reg); | 1523 Register mask_reg); |
1531 | 1524 |
1532 // Helper for throwing exceptions. Compute a handler address and jump to | |
1533 // it. See the implementation for register usage. | |
1534 void JumpToHandlerEntry(); | |
1535 | |
1536 // Compute memory operands for safepoint stack slots. | 1525 // Compute memory operands for safepoint stack slots. |
1537 Operand SafepointRegisterSlot(Register reg); | 1526 Operand SafepointRegisterSlot(Register reg); |
1538 static int SafepointRegisterStackIndex(int reg_code) { | 1527 static int SafepointRegisterStackIndex(int reg_code) { |
1539 return kNumSafepointRegisters - kSafepointPushRegisterIndices[reg_code] - 1; | 1528 return kNumSafepointRegisters - kSafepointPushRegisterIndices[reg_code] - 1; |
1540 } | 1529 } |
1541 | 1530 |
1542 // Needs access to SafepointRegisterStackIndex for compiled frame | 1531 // Needs access to SafepointRegisterStackIndex for compiled frame |
1543 // traversal. | 1532 // traversal. |
1544 friend class StandardFrame; | 1533 friend class StandardFrame; |
1545 }; | 1534 }; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 masm->popfq(); \ | 1614 masm->popfq(); \ |
1626 } \ | 1615 } \ |
1627 masm-> | 1616 masm-> |
1628 #else | 1617 #else |
1629 #define ACCESS_MASM(masm) masm-> | 1618 #define ACCESS_MASM(masm) masm-> |
1630 #endif | 1619 #endif |
1631 | 1620 |
1632 } } // namespace v8::internal | 1621 } } // namespace v8::internal |
1633 | 1622 |
1634 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1623 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |