Changeset 66 in dev for BasicCompiler32/Compile_Calc_PushVar.cpp
- Timestamp:
- Mar 9, 2007, 4:59:13 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Calc_PushVar.cpp
r62 r66 66 66 } 67 67 void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg){ 68 int var _size;69 70 var _size=GetTypeSize(type,-1);71 72 if(var _size==sizeof(_int64)){68 int varSize; 69 70 varSize=GetTypeSize(type,-1); 71 72 if(varSize==sizeof(_int64)){ 73 73 //64ビットの場合はedx:eaxにロード 74 74 if(reg!=REG_EAX){ … … 91 91 if(pRelativeVar->bOffsetOffset){ 92 92 //mov reg, ptr[ecx+offset] 93 op_mov_RM(var _size,reg,REG_ECX,(int)pRelativeVar->offset,MOD_BASE_DISP32);93 op_mov_RM(varSize,reg,REG_ECX,(int)pRelativeVar->offset,MOD_BASE_DISP32); 94 94 } 95 95 else{ 96 96 //mov reg, ptr[offset] 97 op_mov_RM(var _size,reg,0,(int)pRelativeVar->offset,MOD_DISP32);97 op_mov_RM(varSize,reg,0,(int)pRelativeVar->offset,MOD_DISP32); 98 98 } 99 99 obp-=sizeof(long); … … 104 104 if(pRelativeVar->bOffsetOffset){ 105 105 //add ecx,qword ptr[offset] 106 op_add_RM(var _size,REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);106 op_add_RM(varSize,REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32); 107 107 } 108 108 else{ 109 109 //mov ecx,qword ptr[offset] 110 op_mov_RM(var _size,REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32);110 op_mov_RM(varSize,REG_ECX,REG_NON,(int)pRelativeVar->offset,MOD_DISP32); 111 111 } 112 112 obp-=sizeof(long); … … 119 119 if(pRelativeVar->bOffsetOffset){ 120 120 //mov reg, ptr[ebp+ecx+offset] 121 op_mov_RM_ex(var _size,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET);121 op_mov_RM_ex(varSize,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET); 122 122 } 123 123 else{ 124 124 //mov reg, ptr[ebp+offset] 125 op_mov_RM(var _size,reg,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);125 op_mov_RM(varSize,reg,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32); 126 126 } 127 127 obp-=sizeof(long); … … 132 132 if(pRelativeVar->bOffsetOffset){ 133 133 //add ecx,qword ptr[ebp+offset] 134 op_add_RM(var _size,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);134 op_add_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32); 135 135 } 136 136 else{ 137 137 //mov ecx,qword ptr[ebp+offset] 138 op_mov_RM(var _size,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);138 op_mov_RM(varSize,REG_ECX,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32); 139 139 } 140 140 obp-=sizeof(long); … … 147 147 directmem: 148 148 //mov reg, ptr[ecx] 149 op_mov_RM(var _size,reg,REG_ECX,0,MOD_BASE);149 op_mov_RM(varSize,reg,REG_ECX,0,MOD_BASE); 150 150 } 151 151 }
Note:
See TracChangeset
for help on using the changeset viewer.