Changeset 242 in dev for trunk/abdev/BasicCompiler64/CodeGenerator.cpp
- Timestamp:
- Jul 27, 2007, 3:40:33 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/CodeGenerator.cpp
r232 r242 136 136 } 137 137 138 void CodeGenerator::__jmp_op_format( char opcode, long offset, int op_size )139 {140 pNativeCode->Put( opcode );141 if( op_size == sizeof(char) )142 {143 pNativeCode->Put( (char)offset );144 }145 else if( op_size == sizeof(long) )146 {147 SetError();148 pNativeCode->Put( offset );149 }150 else151 {152 SetError();153 }154 }155 156 138 157 139 … … 1690 1672 1691 1673 ///////////////////////////// 1692 // 分岐1693 /////////////////////////////1694 1695 void CodeGenerator::op_jle( long offset, int op_size )1696 {1697 __jmp_op_format( (char)0x7E, offset, op_size );1698 }1699 void CodeGenerator::op_jbe( long offset, int op_size )1700 {1701 __jmp_op_format( (char)0x76, offset, op_size );1702 }1703 void CodeGenerator::op_jge( long offset, int op_size )1704 {1705 __jmp_op_format( (char)0x7D, offset, op_size );1706 }1707 void CodeGenerator::op_jae( long offset, int op_size )1708 {1709 __jmp_op_format( (char)0x73, offset, op_size );1710 }1711 void CodeGenerator::op_jl( long offset, int op_size )1712 {1713 __jmp_op_format( (char)0x7C, offset, op_size );1714 }1715 void CodeGenerator::op_jb( long offset, int op_size )1716 {1717 __jmp_op_format( (char)0x72, offset, op_size );1718 }1719 void CodeGenerator::op_jg( long offset, int op_size )1720 {1721 __jmp_op_format( (char)0x7F, offset, op_size );1722 }1723 void CodeGenerator::op_ja( long offset, int op_size )1724 {1725 __jmp_op_format( (char)0x77, offset, op_size );1726 }1727 void CodeGenerator::op_jne( long offset, int op_size )1728 {1729 __jmp_op_format( (char)0x75, offset, op_size );1730 }1731 void CodeGenerator::op_je( long offset, int op_size )1732 {1733 __jmp_op_format( (char)0x74, offset, op_size );1734 }1735 void CodeGenerator::op_jmp( long offset, int op_size )1736 {1737 __jmp_op_format( (char)0xEB, offset, op_size );1738 }1739 1740 1741 1742 /////////////////////////////1743 1674 // 関数呼び出し 1744 1675 /////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.