Changeset 55 in dev for BasicCompiler64
- Timestamp:
- Feb 13, 2007, 3:14:57 AM (18 years ago)
- Location:
- BasicCompiler64
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_Calc.cpp
r46 r55 11 11 SetBooleanVariable(CalcType,pRelativeVar); 12 12 } 13 if(VarType==DEF_CHAR||VarType==DEF_BYTE){13 else if(VarType==DEF_SBYTE||VarType==DEF_BYTE || (isUnicode==false&&VarType==DEF_CHAR)){ 14 14 //8ビット変数へalレジスタの内容を格納する 15 15 SetWholeVariable(sizeof(char),CalcType,pRelativeVar); 16 16 } 17 else if(VarType==DEF_INTEGER||VarType==DEF_WORD ){17 else if(VarType==DEF_INTEGER||VarType==DEF_WORD || (isUnicode&&VarType==DEF_CHAR)){ 18 18 //16ビット変数へaxレジスタの内容を格納する 19 19 SetWholeVariable(sizeof(short),CalcType,pRelativeVar); … … 34 34 //Single型変数へスタックの内容を格納する 35 35 SetSingleVariable(CalcType,pRelativeVar); 36 } 37 else{ 38 SetError(300,NULL,cp); 36 39 } 37 40 } -
BasicCompiler64/Compile_Var.cpp
r50 r55 909 909 else if(type==DEF_LONG||type==DEF_DWORD) 910 910 *(DWORD *)(initGlobalBuf+offset)=(DWORD)i64data; 911 else if(type==DEF_INTEGER||type==DEF_WORD )911 else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)) 912 912 *(WORD *)(initGlobalBuf+offset)=(WORD)i64data; 913 else if(type==DEF_ CHAR||type==DEF_BYTE||type==DEF_BOOLEAN)913 else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)) 914 914 *(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data; 915 915 … … 1079 1079 obp+=sizeof(long)+sizeof(long); 1080 1080 } 1081 else if(type==DEF_INTEGER||type==DEF_WORD ){1081 else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)){ 1082 1082 //mov word ptr[rsp+offset],value 1083 1083 op_mov_MV(sizeof(short),REG_RSP,offset,USE_OFFSET,(int)i64data); … … 1086 1086 obp+=sizeof(long)+sizeof(short); 1087 1087 } 1088 else if(type==DEF_ CHAR||type==DEF_BYTE||type==DEF_BOOLEAN){1088 else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)){ 1089 1089 //mov byte ptr[rsp+offset],value 1090 1090 op_mov_MV(sizeof(char),REG_RSP,offset,USE_OFFSET,(int)i64data); -
BasicCompiler64/NumOpe_TypeOperation.cpp
r36 r55 10 10 //and reg,00000000FFFFFFFFh 11 11 } 12 else if(type==DEF_INTEGER ){12 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 13 13 //movsx reg64,reg16 14 14 op_movsx64_FromReg16(reg,reg); … … 18 18 op_and64_value(reg,(int)0xFFFF); 19 19 } 20 else if(type==DEF_ CHAR){20 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 21 21 //movsx reg64,reg8 22 22 op_movsx64_FromReg8(reg,reg); … … 28 28 } 29 29 void ExtendTypeTo32(int type,int reg){ 30 if(type==DEF_INTEGER ){30 if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 31 31 //movsx reg32,reg16 32 32 op_movsx32_FromReg16(reg,reg); … … 36 36 op_and32_value(reg,(int)0xFFFF); 37 37 } 38 else if(type==DEF_ CHAR){38 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 39 39 //movsx reg32,reg8 40 40 op_movsx32_FromReg8(reg,reg); … … 46 46 } 47 47 void ExtendTypeTo16(int type,int reg){ 48 if(type==DEF_ CHAR){48 if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 49 49 //movsx reg16,reg8 50 50 op_movsx16_FromReg8(reg,reg); -
BasicCompiler64/varlist.cpp
r36 r55 104 104 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 105 105 } 106 else if(type==DEF_INTEGER ){106 else if(type==DEF_INTEGER || (isUnicode&&type==DEF_CHAR)){ 107 107 if(ReadProcessMemory(hDebugProcess,(void *)offset,&wData,sizeof(WORD),&stAccBytes)){ 108 108 sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,(short)wData,(short)wData); … … 116 116 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 117 117 } 118 else if(type==DEF_ CHAR){118 else if(type==DEF_SBYTE || (isUnicode==false&&type==DEF_CHAR)){ 119 119 if(ReadProcessMemory(hDebugProcess,(void *)offset,&byteData,sizeof(BYTE),&stAccBytes)){ 120 120 temporary[0]=byteData;
Note:
See TracChangeset
for help on using the changeset viewer.