Changeset 86699 in webkit for trunk/Source/JavaScriptCore/assembler/X86Assembler.h
- Timestamp:
- May 17, 2011, 1:02:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/X86Assembler.h
r85497 r86699 1020 1020 m_formatter.oneByteOp_disp32(OP_MOV_GvEv, dst, base, offset); 1021 1021 } 1022 1023 void movl_mr_disp8(int offset, RegisterID base, RegisterID dst) 1024 { 1025 m_formatter.oneByteOp_disp8(OP_MOV_GvEv, dst, base, offset); 1026 } 1022 1027 1023 1028 void movl_mr(int offset, RegisterID base, RegisterID index, int scale, RegisterID dst) … … 1089 1094 { 1090 1095 m_formatter.oneByteOp64_disp32(OP_MOV_GvEv, dst, base, offset); 1096 } 1097 1098 void movq_mr_disp8(int offset, RegisterID base, RegisterID dst) 1099 { 1100 m_formatter.oneByteOp64_disp8(OP_MOV_GvEv, dst, base, offset); 1091 1101 } 1092 1102 … … 1538 1548 setRel32(from, to); 1539 1549 } 1550 1551 static void repatchCompact(void* where, int32_t value) 1552 { 1553 ASSERT(value >= 0); 1554 ASSERT(value <= std::numeric_limits<int8_t>::max()); 1555 setInt8(where, value); 1556 } 1540 1557 1541 1558 static void repatchInt32(void* where, int32_t value) … … 1587 1604 { 1588 1605 reinterpret_cast<int32_t*>(where)[-1] = value; 1606 } 1607 1608 static void setInt8(void* where, int8_t value) 1609 { 1610 reinterpret_cast<int8_t*>(where)[-1] = value; 1589 1611 } 1590 1612 … … 1662 1684 memoryModRM_disp32(reg, base, offset); 1663 1685 } 1686 1687 void oneByteOp_disp8(OneByteOpcodeID opcode, int reg, RegisterID base, int offset) 1688 { 1689 m_buffer.ensureSpace(maxInstructionSize); 1690 emitRexIfNeeded(reg, 0, base); 1691 m_buffer.putByteUnchecked(opcode); 1692 memoryModRM_disp8(reg, base, offset); 1693 } 1664 1694 1665 1695 void oneByteOp(OneByteOpcodeID opcode, int reg, RegisterID base, RegisterID index, int scale, int offset) … … 1767 1797 m_buffer.putByteUnchecked(opcode); 1768 1798 memoryModRM_disp32(reg, base, offset); 1799 } 1800 1801 void oneByteOp64_disp8(OneByteOpcodeID opcode, int reg, RegisterID base, int offset) 1802 { 1803 m_buffer.ensureSpace(maxInstructionSize); 1804 emitRexW(reg, 0, base); 1805 m_buffer.putByteUnchecked(opcode); 1806 memoryModRM_disp8(reg, base, offset); 1769 1807 } 1770 1808 … … 2000 2038 } 2001 2039 } 2002 2040 2041 void memoryModRM_disp8(int reg, RegisterID base, int offset) 2042 { 2043 // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there. 2044 ASSERT(CAN_SIGN_EXTEND_8_32(offset)); 2045 #if CPU(X86_64) 2046 if ((base == hasSib) || (base == hasSib2)) { 2047 #else 2048 if (base == hasSib) { 2049 #endif 2050 putModRmSib(ModRmMemoryDisp8, reg, base, noIndex, 0); 2051 m_buffer.putByteUnchecked(offset); 2052 } else { 2053 putModRm(ModRmMemoryDisp8, reg, base); 2054 m_buffer.putByteUnchecked(offset); 2055 } 2056 } 2057 2003 2058 void memoryModRM_disp32(int reg, RegisterID base, int offset) 2004 2059 {
Note:
See TracChangeset
for help on using the changeset viewer.