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/base/flags.h" | 10 #include "src/base/flags.h" |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1561 int offset) { | 1561 int offset) { |
1562 return Operand(object, index, scale, offset - kHeapObjectTag); | 1562 return Operand(object, index, scale, offset - kHeapObjectTag); |
1563 } | 1563 } |
1564 | 1564 |
1565 | 1565 |
1566 inline Operand ContextOperand(Register context, int index) { | 1566 inline Operand ContextOperand(Register context, int index) { |
1567 return Operand(context, Context::SlotOffset(index)); | 1567 return Operand(context, Context::SlotOffset(index)); |
1568 } | 1568 } |
1569 | 1569 |
1570 | 1570 |
| 1571 inline Operand ContextOperand(Register context, Register index) { |
| 1572 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); |
| 1573 } |
| 1574 |
| 1575 |
1571 inline Operand GlobalObjectOperand() { | 1576 inline Operand GlobalObjectOperand() { |
1572 return ContextOperand(rsi, Context::GLOBAL_OBJECT_INDEX); | 1577 return ContextOperand(rsi, Context::GLOBAL_OBJECT_INDEX); |
1573 } | 1578 } |
1574 | 1579 |
1575 | 1580 |
1576 // Provides access to exit frame stack space (not GCed). | 1581 // Provides access to exit frame stack space (not GCed). |
1577 inline Operand StackSpaceOperand(int index) { | 1582 inline Operand StackSpaceOperand(int index) { |
1578 #ifdef _WIN64 | 1583 #ifdef _WIN64 |
1579 const int kShaddowSpace = 4; | 1584 const int kShaddowSpace = 4; |
1580 return Operand(rsp, (index + kShaddowSpace) * kPointerSize); | 1585 return Operand(rsp, (index + kShaddowSpace) * kPointerSize); |
(...skipping 24 matching lines...) Expand all Loading... |
1605 masm->popfq(); \ | 1610 masm->popfq(); \ |
1606 } \ | 1611 } \ |
1607 masm-> | 1612 masm-> |
1608 #else | 1613 #else |
1609 #define ACCESS_MASM(masm) masm-> | 1614 #define ACCESS_MASM(masm) masm-> |
1610 #endif | 1615 #endif |
1611 | 1616 |
1612 } } // namespace v8::internal | 1617 } } // namespace v8::internal |
1613 | 1618 |
1614 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1619 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |