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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 void PopSafepointRegisters() { Popad(); } | 312 void PopSafepointRegisters() { Popad(); } |
313 // Store the value in register src in the safepoint register stack | 313 // Store the value in register src in the safepoint register stack |
314 // slot for register dst. | 314 // slot for register dst. |
315 void StoreToSafepointRegisterSlot(Register dst, const Immediate& imm); | 315 void StoreToSafepointRegisterSlot(Register dst, const Immediate& imm); |
316 void StoreToSafepointRegisterSlot(Register dst, Register src); | 316 void StoreToSafepointRegisterSlot(Register dst, Register src); |
317 void LoadFromSafepointRegisterSlot(Register dst, Register src); | 317 void LoadFromSafepointRegisterSlot(Register dst, Register src); |
318 | 318 |
319 void InitializeRootRegister() { | 319 void InitializeRootRegister() { |
320 ExternalReference roots_array_start = | 320 ExternalReference roots_array_start = |
321 ExternalReference::roots_array_start(isolate()); | 321 ExternalReference::roots_array_start(isolate()); |
322 movq(kRootRegister, roots_array_start); | 322 Move(kRootRegister, roots_array_start); |
323 addq(kRootRegister, Immediate(kRootRegisterBias)); | 323 addq(kRootRegister, Immediate(kRootRegisterBias)); |
324 } | 324 } |
325 | 325 |
326 // --------------------------------------------------------------------------- | 326 // --------------------------------------------------------------------------- |
327 // JavaScript invokes | 327 // JavaScript invokes |
328 | 328 |
329 // Set up call kind marking in rcx. The method takes rcx as an | 329 // Set up call kind marking in rcx. The method takes rcx as an |
330 // explicit first parameter to make the code more readable at the | 330 // explicit first parameter to make the code more readable at the |
331 // call sites. | 331 // call sites. |
332 void SetCallKind(Register dst, CallKind kind); | 332 void SetCallKind(Register dst, CallKind kind); |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 | 822 |
823 // Emit code to discard a non-negative number of pointer-sized elements | 823 // Emit code to discard a non-negative number of pointer-sized elements |
824 // from the stack, clobbering only the rsp register. | 824 // from the stack, clobbering only the rsp register. |
825 void Drop(int stack_elements); | 825 void Drop(int stack_elements); |
826 | 826 |
827 void Call(Label* target) { call(target); } | 827 void Call(Label* target) { call(target); } |
828 void Push(Register src) { push(src); } | 828 void Push(Register src) { push(src); } |
829 void Pop(Register dst) { pop(dst); } | 829 void Pop(Register dst) { pop(dst); } |
830 void PushReturnAddressFrom(Register src) { push(src); } | 830 void PushReturnAddressFrom(Register src) { push(src); } |
831 void PopReturnAddressTo(Register dst) { pop(dst); } | 831 void PopReturnAddressTo(Register dst) { pop(dst); } |
| 832 void Move(Register dst, ExternalReference ext) { |
| 833 movq(dst, reinterpret_cast<Address>(ext.address()), |
| 834 RelocInfo::EXTERNAL_REFERENCE); |
| 835 } |
832 | 836 |
833 // Control Flow | 837 // Control Flow |
834 void Jump(Address destination, RelocInfo::Mode rmode); | 838 void Jump(Address destination, RelocInfo::Mode rmode); |
835 void Jump(ExternalReference ext); | 839 void Jump(ExternalReference ext); |
836 void Jump(Handle<Code> code_object, RelocInfo::Mode rmode); | 840 void Jump(Handle<Code> code_object, RelocInfo::Mode rmode); |
837 | 841 |
838 void Call(Address destination, RelocInfo::Mode rmode); | 842 void Call(Address destination, RelocInfo::Mode rmode); |
839 void Call(ExternalReference ext); | 843 void Call(ExternalReference ext); |
840 void Call(Handle<Code> code_object, | 844 void Call(Handle<Code> code_object, |
841 RelocInfo::Mode rmode, | 845 RelocInfo::Mode rmode, |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 masm->popfq(); \ | 1590 masm->popfq(); \ |
1587 } \ | 1591 } \ |
1588 masm-> | 1592 masm-> |
1589 #else | 1593 #else |
1590 #define ACCESS_MASM(masm) masm-> | 1594 #define ACCESS_MASM(masm) masm-> |
1591 #endif | 1595 #endif |
1592 | 1596 |
1593 } } // namespace v8::internal | 1597 } } // namespace v8::internal |
1594 | 1598 |
1595 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1599 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |