| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 759 |
| 760 // Generate an Operand for loading an indexed field from an object. | 760 // Generate an Operand for loading an indexed field from an object. |
| 761 static inline Operand FieldOperand(Register object, | 761 static inline Operand FieldOperand(Register object, |
| 762 Register index, | 762 Register index, |
| 763 ScaleFactor scale, | 763 ScaleFactor scale, |
| 764 int offset) { | 764 int offset) { |
| 765 return Operand(object, index, scale, offset - kHeapObjectTag); | 765 return Operand(object, index, scale, offset - kHeapObjectTag); |
| 766 } | 766 } |
| 767 | 767 |
| 768 | 768 |
| 769 // Return a position of the element at |index_as_smi| + |additional_offset| |
| 770 // in FixedArray pointer to which is held in |array|. |index_as_smi| is Smi. |
| 771 static inline Operand FixedArrayElementOperand(Register array, |
| 772 Register index_as_smi, |
| 773 int additional_offset = 0) { |
| 774 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
| 775 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
| 776 } |
| 777 |
| 769 static inline Operand ContextOperand(Register context, int index) { | 778 static inline Operand ContextOperand(Register context, int index) { |
| 770 return Operand(context, Context::SlotOffset(index)); | 779 return Operand(context, Context::SlotOffset(index)); |
| 771 } | 780 } |
| 772 | 781 |
| 773 | 782 |
| 774 static inline Operand GlobalObjectOperand() { | 783 static inline Operand GlobalObjectOperand() { |
| 775 return ContextOperand(esi, Context::GLOBAL_INDEX); | 784 return ContextOperand(esi, Context::GLOBAL_INDEX); |
| 776 } | 785 } |
| 777 | 786 |
| 778 | 787 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 798 } \ | 807 } \ |
| 799 masm-> | 808 masm-> |
| 800 #else | 809 #else |
| 801 #define ACCESS_MASM(masm) masm-> | 810 #define ACCESS_MASM(masm) masm-> |
| 802 #endif | 811 #endif |
| 803 | 812 |
| 804 | 813 |
| 805 } } // namespace v8::internal | 814 } } // namespace v8::internal |
| 806 | 815 |
| 807 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 816 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |