| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 // from the stack, clobbering only the rsp register. | 841 // from the stack, clobbering only the rsp register. |
| 842 void Drop(int stack_elements); | 842 void Drop(int stack_elements); |
| 843 | 843 |
| 844 void Call(Label* target) { call(target); } | 844 void Call(Label* target) { call(target); } |
| 845 void Push(Register src) { push(src); } | 845 void Push(Register src) { push(src); } |
| 846 void Pop(Register dst) { pop(dst); } | 846 void Pop(Register dst) { pop(dst); } |
| 847 void PushReturnAddressFrom(Register src) { push(src); } | 847 void PushReturnAddressFrom(Register src) { push(src); } |
| 848 void PopReturnAddressTo(Register dst) { pop(dst); } | 848 void PopReturnAddressTo(Register dst) { pop(dst); } |
| 849 void MoveDouble(Register dst, const Operand& src) { movq(dst, src); } | 849 void MoveDouble(Register dst, const Operand& src) { movq(dst, src); } |
| 850 void MoveDouble(const Operand& dst, Register src) { movq(dst, src); } | 850 void MoveDouble(const Operand& dst, Register src) { movq(dst, src); } |
| 851 void MoveReturnAddress(Register dst, const Operand& src) { movq(dst, src); } |
| 852 void MoveReturnAddress(const Operand& dst, Register src) { movq(dst, src); } |
| 851 void Move(Register dst, ExternalReference ext) { | 853 void Move(Register dst, ExternalReference ext) { |
| 852 movq(dst, reinterpret_cast<Address>(ext.address()), | 854 movq(dst, reinterpret_cast<Address>(ext.address()), |
| 853 RelocInfo::EXTERNAL_REFERENCE); | 855 RelocInfo::EXTERNAL_REFERENCE); |
| 854 } | 856 } |
| 855 | 857 |
| 856 // Control Flow | 858 // Control Flow |
| 857 void Jump(Address destination, RelocInfo::Mode rmode); | 859 void Jump(Address destination, RelocInfo::Mode rmode); |
| 858 void Jump(ExternalReference ext); | 860 void Jump(ExternalReference ext); |
| 859 void Jump(Handle<Code> code_object, RelocInfo::Mode rmode); | 861 void Jump(Handle<Code> code_object, RelocInfo::Mode rmode); |
| 860 | 862 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 inline Operand StackSpaceOperand(int index) { | 1587 inline Operand StackSpaceOperand(int index) { |
| 1586 #ifdef _WIN64 | 1588 #ifdef _WIN64 |
| 1587 const int kShaddowSpace = 4; | 1589 const int kShaddowSpace = 4; |
| 1588 return Operand(rsp, (index + kShaddowSpace) * kPointerSize); | 1590 return Operand(rsp, (index + kShaddowSpace) * kPointerSize); |
| 1589 #else | 1591 #else |
| 1590 return Operand(rsp, index * kPointerSize); | 1592 return Operand(rsp, index * kPointerSize); |
| 1591 #endif | 1593 #endif |
| 1592 } | 1594 } |
| 1593 | 1595 |
| 1594 | 1596 |
| 1595 inline Operand StackOperandForReturnAddress(int32_t disp) { | |
| 1596 return Operand(rsp, disp); | |
| 1597 } | |
| 1598 | |
| 1599 | |
| 1600 #ifdef GENERATED_CODE_COVERAGE | 1597 #ifdef GENERATED_CODE_COVERAGE |
| 1601 extern void LogGeneratedCodeCoverage(const char* file_line); | 1598 extern void LogGeneratedCodeCoverage(const char* file_line); |
| 1602 #define CODE_COVERAGE_STRINGIFY(x) #x | 1599 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 1603 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1600 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 1604 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1601 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1605 #define ACCESS_MASM(masm) { \ | 1602 #define ACCESS_MASM(masm) { \ |
| 1606 Address x64_coverage_function = FUNCTION_ADDR(LogGeneratedCodeCoverage); \ | 1603 Address x64_coverage_function = FUNCTION_ADDR(LogGeneratedCodeCoverage); \ |
| 1607 masm->pushfq(); \ | 1604 masm->pushfq(); \ |
| 1608 masm->Pushad(); \ | 1605 masm->Pushad(); \ |
| 1609 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ | 1606 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ |
| 1610 masm->Call(x64_coverage_function, RelocInfo::EXTERNAL_REFERENCE); \ | 1607 masm->Call(x64_coverage_function, RelocInfo::EXTERNAL_REFERENCE); \ |
| 1611 masm->pop(rax); \ | 1608 masm->pop(rax); \ |
| 1612 masm->Popad(); \ | 1609 masm->Popad(); \ |
| 1613 masm->popfq(); \ | 1610 masm->popfq(); \ |
| 1614 } \ | 1611 } \ |
| 1615 masm-> | 1612 masm-> |
| 1616 #else | 1613 #else |
| 1617 #define ACCESS_MASM(masm) masm-> | 1614 #define ACCESS_MASM(masm) masm-> |
| 1618 #endif | 1615 #endif |
| 1619 | 1616 |
| 1620 } } // namespace v8::internal | 1617 } } // namespace v8::internal |
| 1621 | 1618 |
| 1622 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1619 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |