Changeset 238 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Jul 26, 2007, 5:22:11 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/CodeGenerator.h
r237 r238 17 17 18 18 public: 19 20 // コード生成時の部分的なスケジューリング 19 21 class PertialSchedule 20 22 { 21 int codePos; 22 int typeSize; 23 24 int _obpOld; 23 int id; // 通し番号 24 25 int codePos; // バッファ位置 26 int typeSize; // 対象サイズ(一般的には8bit/32bit) 27 28 int _obpOld; // 未完成 25 29 public: 26 30 PertialSchedule( int codePos, int typeSize ) … … 28 32 , typeSize( typeSize ) 29 33 { 34 static int _id = 0; 35 id = _id++; 36 30 37 extern int obp; 31 _obpOld = obp -typeSize;38 _obpOld = obp; 32 39 } 33 40 ~PertialSchedule() 34 41 { 42 } 43 44 bool IsEquals( const PertialSchedule &pertialSchedule ) 45 { 46 return ( this->id == pertialSchedule.id ); 35 47 } 36 48 … … 78 90 void CheckUnresolveSchedule(); 79 91 80 void opfix_JmpPertialSchedule( const PertialSchedule *pPertialSchedule ) 81 { 82 PertialSchedules::iterator it = pertialSchedules.begin(); 83 while( it != pertialSchedules.end() ) 84 { 85 if( &(*it) == pPertialSchedule ) 86 { 87 pNativeCode->Overwrite( pPertialSchedule->GetCodePos(), (char)(pNativeCode->GetSize() - pPertialSchedule->GetCodePos()) ); 88 89 // 未完成 90 extern int obp; 91 pNativeCode->OverwriteOld( pPertialSchedule->GetObpOld(), obp-pPertialSchedule->GetObpOld() ); 92 93 pertialSchedules.erase( it ); 94 } 95 else 96 { 97 it++; 98 } 99 } 100 } 92 void opfix_JmpPertialSchedule( const PertialSchedule *pPertialSchedule ); 101 93 102 94 … … 108 100 PertialSchedule *__jmp_op_format( char opcode, long offset, int op_size, bool isPertialSchedule = false ); 109 101 public: 110 void op_jle( long offset, int op_size = sizeof(char));111 void op_jbe( long offset, int op_size = sizeof(char));112 void op_jge( long offset, int op_size = sizeof(char));113 void op_jae( long offset, int op_size = sizeof(char));114 void op_jl( long offset, int op_size = sizeof(char));115 void op_jb( long offset, int op_size = sizeof(char));116 void op_jg( long offset, int op_size = sizeof(char));102 PertialSchedule *op_jle( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 103 PertialSchedule *op_jbe( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 104 PertialSchedule *op_jge( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 105 PertialSchedule *op_jae( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 106 PertialSchedule *op_jl( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 107 PertialSchedule *op_jb( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 108 PertialSchedule *op_jg( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 117 109 PertialSchedule *op_ja( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 118 110 PertialSchedule *op_jne( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 119 void op_je( long offset, int op_size = sizeof(char));120 void op_jmp( long offset, int op_size = sizeof(char));111 PertialSchedule *op_je( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 112 PertialSchedule *op_jmp( long offset, int op_size = sizeof(char), bool isPertialSchedule = false ); 121 113 122 114
Note:
See TracChangeset
for help on using the changeset viewer.