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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 void Move(Register dst, Handle<Object> source); | 805 void Move(Register dst, Handle<Object> source); |
806 void Move(const Operand& dst, Handle<Object> source); | 806 void Move(const Operand& dst, Handle<Object> source); |
807 void Cmp(Register dst, Handle<Object> source); | 807 void Cmp(Register dst, Handle<Object> source); |
808 void Cmp(const Operand& dst, Handle<Object> source); | 808 void Cmp(const Operand& dst, Handle<Object> source); |
809 void Cmp(Register dst, Smi* src); | 809 void Cmp(Register dst, Smi* src); |
810 void Cmp(const Operand& dst, Smi* src); | 810 void Cmp(const Operand& dst, Smi* src); |
811 void Push(Handle<Object> source); | 811 void Push(Handle<Object> source); |
812 | 812 |
813 // Load a heap object and handle the case of new-space objects by | 813 // Load a heap object and handle the case of new-space objects by |
814 // indirecting via a global cell. | 814 // indirecting via a global cell. |
815 void LoadHeapObject(Register result, Handle<HeapObject> object); | 815 void MoveHeapObject(Register result, Handle<Object> object); |
816 void CmpHeapObject(Register reg, Handle<HeapObject> object); | |
817 void PushHeapObject(Handle<HeapObject> object); | |
818 | |
819 void LoadObject(Register result, Handle<Object> object) { | |
820 AllowDeferredHandleDereference heap_object_check; | |
821 if (object->IsHeapObject()) { | |
822 LoadHeapObject(result, Handle<HeapObject>::cast(object)); | |
823 } else { | |
824 Move(result, object); | |
825 } | |
826 } | |
827 | |
828 void CmpObject(Register reg, Handle<Object> object) { | |
829 AllowDeferredHandleDereference heap_object_check; | |
830 if (object->IsHeapObject()) { | |
831 CmpHeapObject(reg, Handle<HeapObject>::cast(object)); | |
832 } else { | |
833 Cmp(reg, object); | |
834 } | |
835 } | |
836 | 816 |
837 // Load a global cell into a register. | 817 // Load a global cell into a register. |
838 void LoadGlobalCell(Register dst, Handle<Cell> cell); | 818 void LoadGlobalCell(Register dst, Handle<Cell> cell); |
839 | 819 |
840 // Emit code to discard a non-negative number of pointer-sized elements | 820 // Emit code to discard a non-negative number of pointer-sized elements |
841 // from the stack, clobbering only the rsp register. | 821 // from the stack, clobbering only the rsp register. |
842 void Drop(int stack_elements); | 822 void Drop(int stack_elements); |
843 | 823 |
844 void Call(Label* target) { call(target); } | 824 void Call(Label* target) { call(target); } |
845 void Push(Register src) { push(src); } | 825 void Push(Register src) { push(src); } |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 masm->popfq(); \ | 1583 masm->popfq(); \ |
1604 } \ | 1584 } \ |
1605 masm-> | 1585 masm-> |
1606 #else | 1586 #else |
1607 #define ACCESS_MASM(masm) masm-> | 1587 #define ACCESS_MASM(masm) masm-> |
1608 #endif | 1588 #endif |
1609 | 1589 |
1610 } } // namespace v8::internal | 1590 } } // namespace v8::internal |
1611 | 1591 |
1612 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1592 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |