Index: trunk/abdev/BasicCompiler32/NumOpe_TypeOperation.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/NumOpe_TypeOperation.cpp	(revision 206)
+++ trunk/abdev/BasicCompiler32/NumOpe_TypeOperation.cpp	(revision 225)
@@ -20,14 +20,14 @@
 
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//cdq
-		op_cdq();
+		compiler.codeGenerator.op_cdq();
 
 		//push edx
-		op_push(REG_EDX);
+		compiler.codeGenerator.op_push(REG_EDX);
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 	else{
@@ -35,11 +35,11 @@
 
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//push 0
-		op_push_V(0);
+		compiler.codeGenerator.op_push_V(0);
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 }
@@ -49,27 +49,25 @@
 	if(Is64Type(type)){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//pop edx
-		op_pop(REG_EDX);
+		compiler.codeGenerator.op_pop(REG_EDX);
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 	else if(type==DEF_INTEGER || (Smoothie::IsUnicode()&&type==DEF_CHAR)){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//movsx eax,ax
-		OpBuffer[obp++]=(char)0x0F;
-		OpBuffer[obp++]=(char)0xBF;
-		OpBuffer[obp++]=(char)0xC0;
+		compiler.codeGenerator.op_movsx_R32R16( REG_EAX );
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 	else if(type==DEF_WORD){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//and eax,0000FFFFh
@@ -79,21 +77,19 @@
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 	else if(type==DEF_SBYTE || (Smoothie::IsUnicode()==false&&type==DEF_CHAR)){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//movsx eax,al
-		OpBuffer[obp++]=(char)0x0F;
-		OpBuffer[obp++]=(char)0xBE;
-		OpBuffer[obp++]=(char)0xC0;
+		compiler.codeGenerator.op_movsx_R32R8( REG_EAX );
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 	else if(type==DEF_BYTE||type==DEF_BOOLEAN){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//and eax,000000FFh
@@ -103,5 +99,5 @@
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 }
@@ -109,17 +105,15 @@
 	if(type==DEF_SBYTE || (Smoothie::IsUnicode()==false&&type==DEF_CHAR)){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//movsx eax,al
-		OpBuffer[obp++]=(char)0x0F;
-		OpBuffer[obp++]=(char)0xBE;
-		OpBuffer[obp++]=(char)0xC0;
+		compiler.codeGenerator.op_movsx_R32R8( REG_EAX );
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 	else if(type==DEF_BYTE){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//and eax,000000FFh
@@ -129,5 +123,5 @@
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 }
@@ -135,11 +129,11 @@
 	if(Is64Type(type)){
 		//pop eax
-		op_pop(REG_EAX);
+		compiler.codeGenerator.op_pop(REG_EAX);
 
 		//pop edx
-		op_pop(REG_EDX);
+		compiler.codeGenerator.op_pop(REG_EDX);
 
 		//push eax
-		op_push(REG_EAX);
+		compiler.codeGenerator.op_push(REG_EAX);
 	}
 }
@@ -150,18 +144,18 @@
 		if(Is64Type(NewType)){
 			//fld qword ptr[esp]
-			op_fld_ptr_esp(DEF_DOUBLE);
+			compiler.codeGenerator.op_fld_ptr_esp(DEF_DOUBLE);
 
 			//fistp qword ptr[esp]
-			op_fistp_ptr_esp( sizeof(_int64) );
+			compiler.codeGenerator.op_fistp_ptr_esp( sizeof(_int64) );
 		}
 		else{
 			//fld qword ptr[esp]
-			op_fld_ptr_esp(DEF_DOUBLE);
+			compiler.codeGenerator.op_fld_ptr_esp(DEF_DOUBLE);
 
 			//add esp,4
-			op_add_esp(4);
+			compiler.codeGenerator.op_add_esp(4);
 
 			//fistp dword ptr[esp]
-			op_fistp_ptr_esp( sizeof(long) );
+			compiler.codeGenerator.op_fistp_ptr_esp( sizeof(long) );
 		}
 	}
@@ -169,18 +163,18 @@
 		if(Is64Type(NewType)){
 			//fld dword ptr[esp]
-			op_fld_ptr_esp(DEF_SINGLE);
+			compiler.codeGenerator.op_fld_ptr_esp(DEF_SINGLE);
 
 			//sub esp,4
-			op_sub_esp(4);
+			compiler.codeGenerator.op_sub_esp(4);
 
 			//fistp qword ptr[esp]
-			op_fistp_ptr_esp( sizeof(_int64) );
+			compiler.codeGenerator.op_fistp_ptr_esp( sizeof(_int64) );
 		}
 		else{
 			//fld dword ptr[esp]
-			op_fld_ptr_esp(DEF_SINGLE);
+			compiler.codeGenerator.op_fld_ptr_esp(DEF_SINGLE);
 
 			//fistp dword ptr[esp]
-			op_fistp_ptr_esp( sizeof(long) );
+			compiler.codeGenerator.op_fistp_ptr_esp( sizeof(long) );
 		}
 	}
