Changeset 232 in dev for trunk/abdev/BasicCompiler64/Compile_Set_Var.cpp
- Timestamp:
- Jul 25, 2007, 4:04:11 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/Compile_Set_Var.cpp
r228 r232 105 105 if(pRelative->bOffsetOffset){ 106 106 //movsd qword ptr[r11+offset],xmm0 107 OpBuffer[obp++]=(char)0xF2; 108 OpBuffer[obp++]=(char)0x41; 109 OpBuffer[obp++]=(char)0x0F; 110 OpBuffer[obp++]=(char)0x11; 111 OpBuffer[obp++]=(char)0x83; 112 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 113 pobj_GlobalVarSchedule->add(); 114 obp+=sizeof(long); 107 compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_R11, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::GlobalVar ); 115 108 } 116 109 else{ 117 110 //movsd qword ptr[offset],xmm0 118 OpBuffer[obp++]=(char)0xF2; 119 OpBuffer[obp++]=(char)0x0F; 120 OpBuffer[obp++]=(char)0x11; 121 OpBuffer[obp++]=(char)0x04; 122 OpBuffer[obp++]=(char)0x25; 123 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 124 pobj_GlobalVarSchedule->add(); 125 obp+=sizeof(long); 111 compiler.codeGenerator.op_movsd_MR( REG_XMM0, 0, (long)pRelative->offset, MOD_DISP32, Schedule::GlobalVar ); 126 112 } 127 113 } … … 144 130 else{ 145 131 //movsd qword ptr[rsp+offset],xmm0 146 OpBuffer[obp++]=(char)0xF2; 147 OpBuffer[obp++]=(char)0x0F; 148 OpBuffer[obp++]=(char)0x11; 149 OpBuffer[obp++]=(char)0x84; 150 OpBuffer[obp++]=(char)0x24; 151 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 152 AddLocalVarAddrSchedule(); 153 obp+=sizeof(long); 132 compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_RSP, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 154 133 } 155 134 } … … 157 136 if(pRelative->bOffsetOffset){ 158 137 //add r11,qword ptr[rsp+offset] 159 OpBuffer[obp++]=(char)0x4C; 160 OpBuffer[obp++]=(char)0x03; 161 OpBuffer[obp++]=(char)0x9C; 162 OpBuffer[obp++]=(char)0x24; 163 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 164 AddLocalVarAddrSchedule(); 165 obp+=sizeof(long); 138 compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 166 139 } 167 140 else{ 168 141 //mov r11,qword ptr[rsp+offset] 169 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32); 170 obp-=sizeof(long); 171 AddLocalVarAddrSchedule(); 172 obp+=sizeof(long); 142 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 173 143 } 174 144 … … 192 162 if(pRelative->bOffsetOffset){ 193 163 //movss dword ptr[r11+offset],xmm0 194 OpBuffer[obp++]=(char)0xF3; 195 OpBuffer[obp++]=(char)0x41; 196 OpBuffer[obp++]=(char)0x0F; 197 OpBuffer[obp++]=(char)0x11; 198 OpBuffer[obp++]=(char)0x83; 199 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 200 pobj_GlobalVarSchedule->add(); 201 obp+=sizeof(long); 164 compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_R11, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::GlobalVar ); 202 165 } 203 166 else{ 204 167 //movss dword ptr[offset],xmm0 205 OpBuffer[obp++]=(char)0xF3; 206 OpBuffer[obp++]=(char)0x0F; 207 OpBuffer[obp++]=(char)0x11; 208 OpBuffer[obp++]=(char)0x04; 209 OpBuffer[obp++]=(char)0x25; 210 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 211 pobj_GlobalVarSchedule->add(); 212 obp+=sizeof(long); 168 compiler.codeGenerator.op_movss_MR( REG_XMM0, 0, (long)pRelative->offset, MOD_DISP32, Schedule::GlobalVar ); 213 169 } 214 170 } … … 231 187 else{ 232 188 //movss dword ptr[rsp+offset],xmm0 233 OpBuffer[obp++]=(char)0xF3; 234 OpBuffer[obp++]=(char)0x0F; 235 OpBuffer[obp++]=(char)0x11; 236 OpBuffer[obp++]=(char)0x84; 237 OpBuffer[obp++]=(char)0x24; 238 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 239 AddLocalVarAddrSchedule(); 240 obp+=sizeof(long); 189 compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_RSP, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 241 190 } 242 191 } … … 244 193 if(pRelative->bOffsetOffset){ 245 194 //add r11,qword ptr[rsp+offset] 246 OpBuffer[obp++]=(char)0x4C; 247 OpBuffer[obp++]=(char)0x03; 248 OpBuffer[obp++]=(char)0x9C; 249 OpBuffer[obp++]=(char)0x24; 250 *((long *)(OpBuffer+obp))=(int)pRelative->offset; 251 AddLocalVarAddrSchedule(); 252 obp+=sizeof(long); 195 compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 253 196 } 254 197 else{ 255 198 //mov r11,qword ptr[rsp+offset] 256 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32); 257 obp-=sizeof(long); 258 AddLocalVarAddrSchedule(); 259 obp+=sizeof(long); 199 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 260 200 } 261 201 … … 334 274 if(pRelative->bOffsetOffset){ 335 275 //mov ptr[r11+offset],rax/eax/ax/al 336 compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_R11,(int)pRelative->offset,MOD_BASE_DISP32); 337 obp-=sizeof(long); 338 pobj_GlobalVarSchedule->add(); 339 obp+=sizeof(long); 276 compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_R11,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::GlobalVar ); 340 277 } 341 278 else{ 342 279 //mov ptr[offset],rax/eax/ax/al 343 compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,0,(int)pRelative->offset,MOD_DISP32); 344 obp-=sizeof(long); 345 pobj_GlobalVarSchedule->add(); 346 obp+=sizeof(long); 280 compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,0,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar ); 347 281 } 348 282 } … … 350 284 if(pRelative->bOffsetOffset){ 351 285 //add r11,qword ptr[offset] 352 compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelative->offset, MOD_DISP32 ); 353 obp-=sizeof(long); 354 pobj_GlobalVarSchedule->add(); 355 obp+=sizeof(long); 286 compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelative->offset, MOD_DISP32, Schedule::GlobalVar ); 356 287 } 357 288 else{ 358 289 //mov r11,qword ptr[offset] 359 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelative->offset,MOD_DISP32); 360 obp-=sizeof(long); 361 pobj_GlobalVarSchedule->add(); 362 obp+=sizeof(long); 290 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar ); 363 291 } 364 292 … … 368 296 if(pRelative->bOffsetOffset){ 369 297 //mov ptr[rsp+r11+offset],rax/eax/ax/al 370 compiler.codeGenerator.op_mov_MR_ex(varSize,REG_RAX,REG_RSP,REG_R11,(int)pRelative->offset,USE_OFFSET); 371 obp-=sizeof(long); 372 AddLocalVarAddrSchedule(); 373 obp+=sizeof(long); 298 compiler.codeGenerator.op_mov_MR_ex(varSize,REG_RAX,REG_RSP,REG_R11,(int)pRelative->offset,USE_OFFSET, Schedule::LocalVar ); 374 299 } 375 300 else{ 376 301 //mov ptr[rsp+offset],rax/eax/ax/al 377 compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32); 378 obp-=sizeof(long); 379 AddLocalVarAddrSchedule(); 380 obp+=sizeof(long); 302 compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 381 303 } 382 304 } … … 384 306 if(pRelative->bOffsetOffset){ 385 307 //add r11,qword ptr[rsp+offset] 386 compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_RSP, (int)pRelative->offset, MOD_BASE_DISP32 ); 387 obp-=sizeof(long); 388 AddLocalVarAddrSchedule(); 389 obp+=sizeof(long); 308 compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_RSP, (int)pRelative->offset, MOD_BASE_DISP32, Schedule::LocalVar ); 390 309 } 391 310 else{ 392 311 //mov r11,qword ptr[rsp+offset] 393 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32); 394 obp-=sizeof(long); 395 AddLocalVarAddrSchedule(); 396 obp+=sizeof(long); 312 compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar ); 397 313 } 398 314
Note:
See TracChangeset
for help on using the changeset viewer.