Changeset 86 in dev for BasicCompiler64
- Timestamp:
- Mar 30, 2007, 5:12:12 AM (18 years ago)
- Location:
- BasicCompiler64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_ProcOp.cpp
r85 r86 2 2 #include "Opcode.h" 3 3 4 void SystemProc( const char *name){5 if( lstrcmp(name,"_System_GetEip")==0){4 void SystemProc( const UserProc &userProc ){ 5 if( userProc.GetName() == "_System_GetEip" ){ 6 6 //mov rax,qword ptr[rsp] 7 7 op_mov_RM(sizeof(_int64),REG_RAX,REG_RSP,0,MOD_BASE); … … 10 10 OpBuffer[obp++]=(char)0xC3; 11 11 } 12 else if( lstrcmp(name,"_System_InitDllGlobalVariables")==0){12 else if( userProc.GetName() == "_System_InitDllGlobalVariables" ){ 13 13 //////////////////////////////////////// 14 14 // DLLのグローバル領域をコンパイル … … 61 61 OpBuffer[obp++]=(char)0xC3; 62 62 } 63 else if( lstrcmp(name,"_System_InitStaticLocalVariables")==0){63 else if( userProc.GetName() == "_System_InitStaticLocalVariables" ){ 64 64 //静的ローカルオブジェクトのコンストラクタ呼び出し 65 65 … … 95 95 OpBuffer[obp++]=(char)0xC3; 96 96 } 97 else if( lstrcmp(name,"_System_Call_Destructor_of_GlobalObject")==0){97 else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" ){ 98 98 //sub rsp,8(※RSPを16バイト境界にあわせるため) 99 99 op_sub_rsp(0x8); … … 115 115 OpBuffer[obp++]=(char)0xC3; 116 116 } 117 else if( lstrcmp(name,"_System_GetSp")==0){117 else if( userProc.GetName() == "_System_GetSp" ){ 118 118 //mov rax,rsp 119 119 op_mov_RR(REG_RAX,REG_RSP); … … 125 125 OpBuffer[obp++]=(char)0xC3; 126 126 } 127 else if( lstrcmp(name,"_allrem")==0){127 else if( userProc.GetName() == "_allrem" ){ 128 128 //乗除演算用の特殊関数(64ビット整数対応) 129 129 BYTE Buffer_allrem[]={ … … 134 134 obp+=178; 135 135 } 136 else if( lstrcmp(name,"_allmul")==0){136 else if( userProc.GetName() == "_allmul" ){ 137 137 //乗算用の特殊関数(64ビット整数対応) 138 138 BYTE Buffer_allmul[]={ … … 143 143 obp+=52; 144 144 } 145 else if( lstrcmp(name,"_alldiv")==0){145 else if( userProc.GetName() == "_alldiv" ){ 146 146 //除算用の特殊関数(64ビット整数対応) 147 147 BYTE Buffer_alldiv[]={ … … 152 152 obp+=170; 153 153 } 154 else if( lstrcmp(name,"_allshl")==0){154 else if( userProc.GetName() == "_allshl" ){ 155 155 //符号あり左ビットシフト用の特殊関数(64ビット整数対応) 156 156 BYTE Buffer_allshl[]={ … … 161 161 obp+=31; 162 162 } 163 else if( lstrcmp(name,"_allshr")==0){163 else if( userProc.GetName() == "_allshr" ){ 164 164 //符号あり右ビットシフト用の特殊関数(64ビット整数対応) 165 165 BYTE Buffer_allshr[]={ … … 170 170 obp+=33; 171 171 } 172 else if( lstrcmp(name,"_aullshr")==0){172 else if( userProc.GetName() == "_aullshr" ){ 173 173 //符号なし右ビットシフト用の特殊関数(64ビット整数対応) 174 174 BYTE Buffer_aullshr[]={ … … 195 195 obp+=31; 196 196 } 197 else if( userProc.GetName() == "InitializeUserTypes" ){ 198 } 199 else{ 200 SetError(); 201 } 197 202 } 198 203 void CompileBufferInProcedure(UserProc *pUserProc){ … … 240 245 pobj_sf=new CStackFrame(); 241 246 242 SystemProc( pUserProc->GetName().c_str());247 SystemProc(*pUserProc); 243 248 244 249 //スタックフレーム管理用オブジェクトを破棄 -
BasicCompiler64/MakePeHdr.cpp
r78 r86 22 22 *pSub_System_GC_malloc_ForObject, 23 23 *pSub_System_GC_malloc_ForObjectPtr, 24 *pSub_System_GC_free_for_SweepingDelete; 24 *pSub_System_GC_free_for_SweepingDelete, 25 *pSubStaticMethod_System_TypeBase_InitializeUserTypes; 25 26 26 27 … … 226 227 if( pSub_System_GC_free_for_SweepingDelete = GetSubHash( "_System_GC_free_for_SweepingDelete",1 ) ) 227 228 pSub_System_GC_free_for_SweepingDelete->Using(); 229 230 if( pSubStaticMethod_System_TypeBase_InitializeUserTypes = GetSubHash( "_System_TypeBase.InitializeUserTypes",1 ) ){ 231 pSubStaticMethod_System_TypeBase_InitializeUserTypes->Using(); 232 pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsSystemProc(); 233 } 228 234 229 235
Note:
See TracChangeset
for help on using the changeset viewer.