Changeset 228 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Jul 23, 2007, 3:24:20 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/CodeGenerator.h
r226 r228 32 32 33 33 #ifdef _AMD64_ 34 ///////////////////////////////////////////////////////////////// 35 // 64ビット 36 ///////////////////////////////////////////////////////////////// 34 37 private: 35 38 void set_rex(int op_size,int reg,int index_reg,int base_reg); 36 void set_mod_rm_sib_disp(char mod,int reg,int scale,int index_reg,int base_reg,long disp); 37 void __op_format(int op_size,char op_prefix,char opcode1,char opcode2,int reg,int base_reg,long offset,char mod); 39 void set_mod_rm_sib_disp(char mod,int reg,int scale,int index_reg,int base_reg,long disp, Schedule::Type scheduleType = Schedule::None ); 40 void __op_format(int op_size,char op_prefix,char opcode1,char opcode2,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType = Schedule::None ); 41 void __jmp_op_format( char opcode, long offset, int op_size ); 38 42 public: 39 43 void op_mov_RV (int op_size,int reg,long i32data); 40 44 void op_mov_RV64 (int reg,_int64 i64data); 41 void op_mov_RM (int op_size,int reg,int base_reg,long offset,char mod );42 void op_mov_RM_ex (int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset );45 void op_mov_RM (int op_size,int reg,int base_reg,long offset,char mod, Schedule::Type scheduleType = Schedule::None ); 46 void op_mov_RM_ex (int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset, Schedule::Type scheduleType = Schedule::None ); 43 47 void op_mov_MR (int op_size,int reg,int base_reg,long offset,char mod); 44 48 void op_mov_MR_ex (int op_size,int reg,int base_reg1,int base_reg2,long offset,BOOL bUseOffset); … … 53 57 void op_movsx32_FromReg8 (int reg32,int reg8); 54 58 void op_movsx16_FromReg8 (int reg32,int reg8); 59 void op_cqo (); 55 60 void op_inc (int reg); 56 61 void op_dec (int reg); 57 void op_add_RM (int op_size,int reg,int base_reg,int offset,char mod );62 void op_add_RM (int op_size,int reg,int base_reg,int offset,char mod, Schedule::Type scheduleType = Schedule::None ); 58 63 void op_add_RV (int reg,long offset); 59 void op_add 64_reg(int reg1,int reg2);64 void op_add_RR (int reg1,int reg2); 60 65 void op_add32_reg (int reg1,int reg2); 61 66 void op_sub_RV (int op_size,int reg,long i32data); … … 104 109 void op_fld_ptr_esp(int type); 105 110 void op_zero_reg(int reg); 111 void op_jle( long offset, int op_size = sizeof(char) ); 112 void op_jbe( long offset, int op_size = sizeof(char) ); 113 void op_jge( long offset, int op_size = sizeof(char) ); 114 void op_jae( long offset, int op_size = sizeof(char) ); 115 void op_jl( long offset, int op_size = sizeof(char) ); 116 void op_jb( long offset, int op_size = sizeof(char) ); 117 void op_jg( long offset, int op_size = sizeof(char) ); 118 void op_ja( long offset, int op_size = sizeof(char) ); 119 void op_jne( long offset, int op_size = sizeof(char) ); 120 void op_je( long offset, int op_size = sizeof(char) ); 121 void op_jmp( long offset, int op_size = sizeof(char) ); 106 122 void op_call( const UserProc *pUserProc ); 107 123 void op_call( const DllProc *pDllProc ); … … 109 125 110 126 #else 127 ///////////////////////////////////////////////////////////////// 128 // 32ビット 129 ///////////////////////////////////////////////////////////////// 111 130 private: 112 131 void set_mod_rm_sib_disp(char mod,int reg,int scale,int index_reg,int base_reg,long disp); … … 200 219 pNativeCode->Put( c4 ); 201 220 } 221 void PutOld( char c1, char c2, char c3, long l ) 222 { 223 pNativeCode->Put( c1 ); 224 pNativeCode->Put( c2 ); 225 pNativeCode->Put( c3 ); 226 pNativeCode->Put( l ); 227 } 202 228 void PutOld( char c1, char c2, char c3, char c4, char c5 ) 203 229 { -
trunk/abdev/BasicCompiler_Common/include/NativeCode.h
r226 r228 3 3 #include <vector> 4 4 5 #include <jenga/include/common/Exception.h> 6 5 7 #include <BoostSerializationSupport.h> 8 9 void AddLocalVarAddrSchedule(); 6 10 7 11 class Schedule … … 156 160 157 161 // 未完成 162 switch( scheduleType ) 163 { 164 case Schedule::None: 165 break; 166 case Schedule::GlobalVar: 167 extern CSchedule *pobj_GlobalVarSchedule; 168 pobj_GlobalVarSchedule->add(); 169 break; 170 case Schedule::LocalVar: 171 AddLocalVarAddrSchedule(); 172 break; 173 case Schedule::Relocation: 174 break; 175 default: 176 Jenga::Throw( "scheduleTypeが無効な値を保持している" ); 177 break; 178 } 158 179 extern char *OpBuffer; 159 180 extern int obp;
Note:
See TracChangeset
for help on using the changeset viewer.