| 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_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_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/frames.h" | 10 #include "src/frames.h" |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 void AllocateOneByteConsString(Register result, Register scratch1, | 605 void AllocateOneByteConsString(Register result, Register scratch1, |
| 606 Register scratch2, Label* gc_required); | 606 Register scratch2, Label* gc_required); |
| 607 | 607 |
| 608 // Allocate a raw sliced string object. Only the map field of the result is | 608 // Allocate a raw sliced string object. Only the map field of the result is |
| 609 // initialized. | 609 // initialized. |
| 610 void AllocateTwoByteSlicedString(Register result, Register scratch1, | 610 void AllocateTwoByteSlicedString(Register result, Register scratch1, |
| 611 Register scratch2, Label* gc_required); | 611 Register scratch2, Label* gc_required); |
| 612 void AllocateOneByteSlicedString(Register result, Register scratch1, | 612 void AllocateOneByteSlicedString(Register result, Register scratch1, |
| 613 Register scratch2, Label* gc_required); | 613 Register scratch2, Label* gc_required); |
| 614 | 614 |
| 615 // Allocate and initialize a JSValue wrapper with the specified {constructor} |
| 616 // and {value}. |
| 617 void AllocateJSValue(Register result, Register constructor, Register value, |
| 618 Register scratch, Label* gc_required); |
| 619 |
| 615 // Copy memory, byte-by-byte, from source to destination. Not optimized for | 620 // Copy memory, byte-by-byte, from source to destination. Not optimized for |
| 616 // long or aligned copies. | 621 // long or aligned copies. |
| 617 // The contents of index and scratch are destroyed. | 622 // The contents of index and scratch are destroyed. |
| 618 void CopyBytes(Register source, Register destination, Register length, | 623 void CopyBytes(Register source, Register destination, Register length, |
| 619 Register scratch); | 624 Register scratch); |
| 620 | 625 |
| 621 // Initialize fields with filler values. Fields starting at |current_address| | 626 // Initialize fields with filler values. Fields starting at |current_address| |
| 622 // not including |end_address| are overwritten with the value in |filler|. At | 627 // not including |end_address| are overwritten with the value in |filler|. At |
| 623 // the end the loop, |current_address| takes the value of |end_address|. | 628 // the end the loop, |current_address| takes the value of |end_address|. |
| 624 void InitializeFieldsWithFiller(Register current_address, | 629 void InitializeFieldsWithFiller(Register current_address, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 | 771 |
| 767 // Move a constant into a destination using the most efficient encoding. | 772 // Move a constant into a destination using the most efficient encoding. |
| 768 void Move(Register dst, const Immediate& x); | 773 void Move(Register dst, const Immediate& x); |
| 769 void Move(const Operand& dst, const Immediate& x); | 774 void Move(const Operand& dst, const Immediate& x); |
| 770 | 775 |
| 771 // Move an immediate into an XMM register. | 776 // Move an immediate into an XMM register. |
| 772 void Move(XMMRegister dst, uint32_t src); | 777 void Move(XMMRegister dst, uint32_t src); |
| 773 void Move(XMMRegister dst, uint64_t src); | 778 void Move(XMMRegister dst, uint64_t src); |
| 774 void Move(XMMRegister dst, double src) { Move(dst, bit_cast<uint64_t>(src)); } | 779 void Move(XMMRegister dst, double src) { Move(dst, bit_cast<uint64_t>(src)); } |
| 775 | 780 |
| 781 void Move(Register dst, Smi* source) { Move(dst, Immediate(source)); } |
| 782 |
| 776 // Push a handle value. | 783 // Push a handle value. |
| 777 void Push(Handle<Object> handle) { push(Immediate(handle)); } | 784 void Push(Handle<Object> handle) { push(Immediate(handle)); } |
| 778 void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); } | 785 void Push(Smi* smi) { Push(Immediate(smi)); } |
| 779 | 786 |
| 780 Handle<Object> CodeObject() { | 787 Handle<Object> CodeObject() { |
| 781 DCHECK(!code_object_.is_null()); | 788 DCHECK(!code_object_.is_null()); |
| 782 return code_object_; | 789 return code_object_; |
| 783 } | 790 } |
| 784 | 791 |
| 785 // Emit code for a truncating division by a constant. The dividend register is | 792 // Emit code for a truncating division by a constant. The dividend register is |
| 786 // unchanged, the result is in edx, and eax gets clobbered. | 793 // unchanged, the result is in edx, and eax gets clobbered. |
| 787 void TruncatingDiv(Register dividend, int32_t divisor); | 794 void TruncatingDiv(Register dividend, int32_t divisor); |
| 788 | 795 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 } \ | 1010 } \ |
| 1004 masm-> | 1011 masm-> |
| 1005 #else | 1012 #else |
| 1006 #define ACCESS_MASM(masm) masm-> | 1013 #define ACCESS_MASM(masm) masm-> |
| 1007 #endif | 1014 #endif |
| 1008 | 1015 |
| 1009 } // namespace internal | 1016 } // namespace internal |
| 1010 } // namespace v8 | 1017 } // namespace v8 |
| 1011 | 1018 |
| 1012 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1019 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |