Changeset 36418 in webkit for trunk/JavaScriptCore/masm
- Timestamp:
- Sep 14, 2008, 7:18:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/masm/X86Assembler.h
r36401 r36418 210 210 OP2_JNE_rel32 = 0x85, 211 211 OP2_JBE_rel32 = 0x86, 212 OP2_JA_rel32 = 0x87, 212 213 OP2_JL_rel32 = 0x8C, 213 214 OP2_JGE_rel32 = 0x8D, … … 370 371 emitModRm_opm(GROUP1_OP_CMP, addr); 371 372 m_buffer->putInt(imm); 373 } 374 375 void cmpl_i8m(int imm, int offset, RegisterID base, RegisterID index, int scale) 376 { 377 m_buffer->putByte(OP_GROUP1_EvIb); 378 emitModRm_opmsib(GROUP1_OP_CMP, base, index, scale, offset); 379 m_buffer->putByte(imm); 372 380 } 373 381 … … 742 750 } 743 751 752 JmpSrc emitUnlinkedJa() 753 { 754 m_buffer->putByte(OP_2BYTE_ESCAPE); 755 m_buffer->putByte(OP2_JA_rel32); 756 m_buffer->putInt(0); 757 return JmpSrc(m_buffer->getOffset()); 758 } 759 744 760 JmpSrc emitUnlinkedJae() 745 761 { … … 786 802 } 787 803 788 void* getRelocatedAddress(void* code, JmpSrc jump)804 static void* getRelocatedAddress(void* code, JmpSrc jump) 789 805 { 790 806 return reinterpret_cast<void*>((ptrdiff_t)code + jump.m_offset); 791 807 } 792 808 793 void* getRelocatedAddress(void* code, JmpDst jump)809 static void* getRelocatedAddress(void* code, JmpDst jump) 794 810 { 795 811 return reinterpret_cast<void*>((ptrdiff_t)code + jump.m_offset); 812 } 813 814 static int getDifferenceBetweenLabels(JmpDst src, JmpDst dst) 815 { 816 return dst.m_offset - src.m_offset; 817 } 818 819 static int getDifferenceBetweenLabels(JmpDst src, JmpSrc dst) 820 { 821 return dst.m_offset - src.m_offset; 822 } 823 824 static void repatchImmediate(intptr_t where, int32_t value) 825 { 826 reinterpret_cast<int32_t*>(where)[-1] = value; 827 } 828 829 static void repatchDisplacement(intptr_t where, intptr_t value) 830 { 831 reinterpret_cast<intptr_t*>(where)[-1] = value; 832 } 833 834 static void repatchBranchOffset(intptr_t where, void* destination) 835 { 836 reinterpret_cast<intptr_t*>(where)[-1] = (reinterpret_cast<intptr_t>(destination) - where); 796 837 } 797 838 … … 932 973 } 933 974 975 void emitModRm_opmsib(OpcodeID opcode, RegisterID base, RegisterID index, int scale, int offset) 976 { 977 emitModRm_rmsib(static_cast<RegisterID>(opcode), base, index, scale, offset); 978 } 979 934 980 JITCodeBuffer* m_buffer; 935 981 };
Note:
See TracChangeset
for help on using the changeset viewer.