Index: trunk/abdev/BasicCompiler64/Compile_Set_Var.cpp
===================================================================
--- trunk/abdev/BasicCompiler64/Compile_Set_Var.cpp	(revision 228)
+++ trunk/abdev/BasicCompiler64/Compile_Set_Var.cpp	(revision 232)
@@ -105,23 +105,9 @@
 		if(pRelative->bOffsetOffset){
 			//movsd qword ptr[r11+offset],xmm0
-			OpBuffer[obp++]=(char)0xF2;
-			OpBuffer[obp++]=(char)0x41;
-			OpBuffer[obp++]=(char)0x0F;
-			OpBuffer[obp++]=(char)0x11;
-			OpBuffer[obp++]=(char)0x83;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_R11, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::GlobalVar );
 		}
 		else{
 			//movsd qword ptr[offset],xmm0
-			OpBuffer[obp++]=(char)0xF2;
-			OpBuffer[obp++]=(char)0x0F;
-			OpBuffer[obp++]=(char)0x11;
-			OpBuffer[obp++]=(char)0x04;
-			OpBuffer[obp++]=(char)0x25;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_movsd_MR( REG_XMM0, 0, (long)pRelative->offset, MOD_DISP32, Schedule::GlobalVar );
 		}
 	}
@@ -144,12 +130,5 @@
 		else{
 			//movsd qword ptr[rsp+offset],xmm0
-			OpBuffer[obp++]=(char)0xF2;
-			OpBuffer[obp++]=(char)0x0F;
-			OpBuffer[obp++]=(char)0x11;
-			OpBuffer[obp++]=(char)0x84;
-			OpBuffer[obp++]=(char)0x24;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_movsd_MR( REG_XMM0, REG_RSP, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 	}
@@ -157,18 +136,9 @@
 		if(pRelative->bOffsetOffset){
 			//add r11,qword ptr[rsp+offset]
-			OpBuffer[obp++]=(char)0x4C;
-			OpBuffer[obp++]=(char)0x03;
-			OpBuffer[obp++]=(char)0x9C;
-			OpBuffer[obp++]=(char)0x24;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 		else{
 			//mov r11,qword ptr[rsp+offset]
-			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 
@@ -192,23 +162,9 @@
 		if(pRelative->bOffsetOffset){
 			//movss dword ptr[r11+offset],xmm0
-			OpBuffer[obp++]=(char)0xF3;
-			OpBuffer[obp++]=(char)0x41;
-			OpBuffer[obp++]=(char)0x0F;
-			OpBuffer[obp++]=(char)0x11;
-			OpBuffer[obp++]=(char)0x83;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_R11, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::GlobalVar );
 		}
 		else{
 			//movss dword ptr[offset],xmm0
-			OpBuffer[obp++]=(char)0xF3;
-			OpBuffer[obp++]=(char)0x0F;
-			OpBuffer[obp++]=(char)0x11;
-			OpBuffer[obp++]=(char)0x04;
-			OpBuffer[obp++]=(char)0x25;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_movss_MR( REG_XMM0, 0, (long)pRelative->offset, MOD_DISP32, Schedule::GlobalVar );
 		}
 	}
@@ -231,12 +187,5 @@
 		else{
 			//movss dword ptr[rsp+offset],xmm0
-			OpBuffer[obp++]=(char)0xF3;
-			OpBuffer[obp++]=(char)0x0F;
-			OpBuffer[obp++]=(char)0x11;
-			OpBuffer[obp++]=(char)0x84;
-			OpBuffer[obp++]=(char)0x24;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_movss_MR( REG_XMM0, REG_RSP, (long)pRelative->offset, MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 	}
@@ -244,18 +193,9 @@
 		if(pRelative->bOffsetOffset){
 			//add r11,qword ptr[rsp+offset]
-			OpBuffer[obp++]=(char)0x4C;
-			OpBuffer[obp++]=(char)0x03;
-			OpBuffer[obp++]=(char)0x9C;
-			OpBuffer[obp++]=(char)0x24;
-			*((long *)(OpBuffer+obp))=(int)pRelative->offset;
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_add_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 		else{
 			//mov r11,qword ptr[rsp+offset]
-			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 
@@ -334,15 +274,9 @@
 		if(pRelative->bOffsetOffset){
 			//mov ptr[r11+offset],rax/eax/ax/al
-			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_R11,(int)pRelative->offset,MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_R11,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::GlobalVar );
 		}
 		else{
 			//mov ptr[offset],rax/eax/ax/al
-			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,0,(int)pRelative->offset,MOD_DISP32);
-			obp-=sizeof(long);
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,0,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar );
 		}
 	}
@@ -350,15 +284,9 @@
 		if(pRelative->bOffsetOffset){
 			//add r11,qword ptr[offset]
-			compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelative->offset, MOD_DISP32 );
-			obp-=sizeof(long);
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_NON, (int)pRelative->offset, MOD_DISP32, Schedule::GlobalVar );
 		}
 		else{
 			//mov r11,qword ptr[offset]
-			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelative->offset,MOD_DISP32);
-			obp-=sizeof(long);
-			pobj_GlobalVarSchedule->add();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_NON,(int)pRelative->offset,MOD_DISP32, Schedule::GlobalVar );
 		}
 
@@ -368,15 +296,9 @@
 		if(pRelative->bOffsetOffset){
 			//mov ptr[rsp+r11+offset],rax/eax/ax/al
-			compiler.codeGenerator.op_mov_MR_ex(varSize,REG_RAX,REG_RSP,REG_R11,(int)pRelative->offset,USE_OFFSET);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_MR_ex(varSize,REG_RAX,REG_RSP,REG_R11,(int)pRelative->offset,USE_OFFSET, Schedule::LocalVar );
 		}
 		else{
 			//mov ptr[rsp+offset],rax/eax/ax/al
-			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_MR(varSize,REG_RAX,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 	}
@@ -384,15 +306,9 @@
 		if(pRelative->bOffsetOffset){
 			//add r11,qword ptr[rsp+offset]
-			compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_RSP, (int)pRelative->offset, MOD_BASE_DISP32 );
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_add_RM( sizeof(_int64), REG_R11, REG_RSP, (int)pRelative->offset, MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 		else{
 			//mov r11,qword ptr[rsp+offset]
-			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
+			compiler.codeGenerator.op_mov_RM(sizeof(_int64),REG_R11,REG_RSP,(int)pRelative->offset,MOD_BASE_DISP32, Schedule::LocalVar );
 		}
 
