| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 void Move(const Operand& dst, Handle<Object> source); | 781 void Move(const Operand& dst, Handle<Object> source); |
| 782 void Cmp(Register dst, Handle<Object> source); | 782 void Cmp(Register dst, Handle<Object> source); |
| 783 void Cmp(const Operand& dst, Handle<Object> source); | 783 void Cmp(const Operand& dst, Handle<Object> source); |
| 784 void Cmp(Register dst, Smi* src); | 784 void Cmp(Register dst, Smi* src); |
| 785 void Cmp(const Operand& dst, Smi* src); | 785 void Cmp(const Operand& dst, Smi* src); |
| 786 void Push(Handle<Object> source); | 786 void Push(Handle<Object> source); |
| 787 | 787 |
| 788 // Load a heap object and handle the case of new-space objects by | 788 // Load a heap object and handle the case of new-space objects by |
| 789 // indirecting via a global cell. | 789 // indirecting via a global cell. |
| 790 void LoadHeapObject(Register result, Handle<HeapObject> object); | 790 void LoadHeapObject(Register result, Handle<HeapObject> object); |
| 791 void CmpHeapObject(Register reg, Handle<HeapObject> object); |
| 791 void PushHeapObject(Handle<HeapObject> object); | 792 void PushHeapObject(Handle<HeapObject> object); |
| 792 | 793 |
| 793 void LoadObject(Register result, Handle<Object> object) { | 794 void LoadObject(Register result, Handle<Object> object) { |
| 794 ALLOW_HANDLE_DEREF(isolate(), "heap object check"); | 795 ALLOW_HANDLE_DEREF(isolate(), "heap object check"); |
| 795 if (object->IsHeapObject()) { | 796 if (object->IsHeapObject()) { |
| 796 LoadHeapObject(result, Handle<HeapObject>::cast(object)); | 797 LoadHeapObject(result, Handle<HeapObject>::cast(object)); |
| 797 } else { | 798 } else { |
| 798 Move(result, object); | 799 Move(result, object); |
| 799 } | 800 } |
| 800 } | 801 } |
| 801 | 802 |
| 803 void CmpObject(Register reg, Handle<Object> object) { |
| 804 ALLOW_HANDLE_DEREF(isolate(), "heap object check"); |
| 805 if (object->IsHeapObject()) { |
| 806 CmpHeapObject(reg, Handle<HeapObject>::cast(object)); |
| 807 } else { |
| 808 Cmp(reg, object); |
| 809 } |
| 810 } |
| 811 |
| 802 // Load a global cell into a register. | 812 // Load a global cell into a register. |
| 803 void LoadGlobalCell(Register dst, Handle<JSGlobalPropertyCell> cell); | 813 void LoadGlobalCell(Register dst, Handle<JSGlobalPropertyCell> cell); |
| 804 | 814 |
| 805 // Emit code to discard a non-negative number of pointer-sized elements | 815 // Emit code to discard a non-negative number of pointer-sized elements |
| 806 // from the stack, clobbering only the rsp register. | 816 // from the stack, clobbering only the rsp register. |
| 807 void Drop(int stack_elements); | 817 void Drop(int stack_elements); |
| 808 | 818 |
| 809 void Call(Label* target) { call(target); } | 819 void Call(Label* target) { call(target); } |
| 810 | 820 |
| 811 // Control Flow | 821 // Control Flow |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 masm->popfq(); \ | 1527 masm->popfq(); \ |
| 1518 } \ | 1528 } \ |
| 1519 masm-> | 1529 masm-> |
| 1520 #else | 1530 #else |
| 1521 #define ACCESS_MASM(masm) masm-> | 1531 #define ACCESS_MASM(masm) masm-> |
| 1522 #endif | 1532 #endif |
| 1523 | 1533 |
| 1524 } } // namespace v8::internal | 1534 } } // namespace v8::internal |
| 1525 | 1535 |
| 1526 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1536 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |