Changeset 250 in dev for trunk/abdev/BasicCompiler32/Compile_Func.cpp
- Timestamp:
- Jul 29, 2007, 9:30:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Func.cpp
r235 r250 36 36 37 37 //fnstcw word ptr[esp] 38 OpBuffer[obp++]=(char)0xD9; 39 OpBuffer[obp++]=(char)0x3C; 40 OpBuffer[obp++]=(char)0x24; 38 compiler.codeGenerator.PutOld( 39 (char)0xD9, 40 (char)0x3C, 41 (char)0x24 42 ); 41 43 42 44 //mov ax,word ptr[esp] 43 OpBuffer[obp++]=(char)0x66; 44 OpBuffer[obp++]=(char)0x8B; 45 OpBuffer[obp++]=(char)0x04; 46 OpBuffer[obp++]=(char)0x24; 45 compiler.codeGenerator.op_mov_RM( sizeof(short), REG_EAX, REG_ESP, 0, MOD_BASE ); 47 46 48 47 //or ah,0Ch 49 OpBuffer[obp++]=(char)0x80; 50 OpBuffer[obp++]=(char)0xCC; 51 OpBuffer[obp++]=(char)0x0C; 48 compiler.codeGenerator.PutOld( 49 (char)0x80, 50 (char)0xCC, 51 (char)0x0C 52 ); 52 53 53 54 //mov word ptr[esp-2],ax 54 OpBuffer[obp++]=(char)0x66; 55 OpBuffer[obp++]=(char)0x89; 56 OpBuffer[obp++]=(char)0x44; 57 OpBuffer[obp++]=(char)0x24; 58 OpBuffer[obp++]=(char)0xFE; 55 compiler.codeGenerator.op_mov_MR( sizeof(short), REG_EAX, REG_ESP, -2, MOD_BASE_DISP8 ); 59 56 60 57 //fldcw word ptr[esp-2] 61 OpBuffer[obp++]=(char)0xD9; 62 OpBuffer[obp++]=(char)0x6C; 63 OpBuffer[obp++]=(char)0x24; 64 OpBuffer[obp++]=(char)0xFE; 58 compiler.codeGenerator.PutOld( 59 (char)0xD9, 60 (char)0x6C, 61 (char)0x24, 62 (char)0xFE 63 ); 65 64 66 65 //fistp dword ptr[esp+4] 67 OpBuffer[obp++]=(char)0xDB; 68 OpBuffer[obp++]=(char)0x5C; 69 OpBuffer[obp++]=(char)0x24; 70 OpBuffer[obp++]=(char)0x04; 66 compiler.codeGenerator.PutOld( 67 (char)0xDB, 68 (char)0x5C, 69 (char)0x24, 70 (char)0x04 71 ); 71 72 72 73 //fldcw word ptr[esp] 73 OpBuffer[obp++]=(char)0xD9; 74 OpBuffer[obp++]=(char)0x2C; 75 OpBuffer[obp++]=(char)0x24; 74 compiler.codeGenerator.PutOld( 75 (char)0xD9, 76 (char)0x2C, 77 (char)0x24 78 ); 76 79 77 80 //add esp,4 … … 86 89 87 90 //fnstcw word ptr[esp] 88 OpBuffer[obp++]=(char)0xD9; 89 OpBuffer[obp++]=(char)0x3C; 90 OpBuffer[obp++]=(char)0x24; 91 compiler.codeGenerator.PutOld( 92 (char)0xD9, 93 (char)0x3C, 94 (char)0x24 95 ); 91 96 92 97 //mov ax,word ptr[esp] 93 OpBuffer[obp++]=(char)0x66; 94 OpBuffer[obp++]=(char)0x8B; 95 OpBuffer[obp++]=(char)0x04; 96 OpBuffer[obp++]=(char)0x24; 98 compiler.codeGenerator.op_mov_RM( sizeof(short), REG_EAX, REG_ESP, 0, MOD_BASE ); 97 99 98 100 //or ah,0Ch 99 OpBuffer[obp++]=(char)0x80; 100 OpBuffer[obp++]=(char)0xCC; 101 OpBuffer[obp++]=(char)0x0C; 101 compiler.codeGenerator.PutOld( 102 (char)0x80, 103 (char)0xCC, 104 (char)0x0C 105 ); 102 106 103 107 //mov word ptr[esp-2],ax 104 OpBuffer[obp++]=(char)0x66; 105 OpBuffer[obp++]=(char)0x89; 106 OpBuffer[obp++]=(char)0x44; 107 OpBuffer[obp++]=(char)0x24; 108 OpBuffer[obp++]=(char)0xFE; 108 compiler.codeGenerator.op_mov_MR( sizeof(short), REG_EAX, REG_ESP, -2, MOD_BASE_DISP8 ); 109 109 110 110 //fldcw word ptr[esp-2] 111 OpBuffer[obp++]=(char)0xD9; 112 OpBuffer[obp++]=(char)0x6C; 113 OpBuffer[obp++]=(char)0x24; 114 OpBuffer[obp++]=(char)0xFE; 111 compiler.codeGenerator.PutOld( 112 (char)0xD9, 113 (char)0x6C, 114 (char)0x24, 115 (char)0xFE 116 ); 115 117 116 118 //fistp dword ptr[esp+4] 117 OpBuffer[obp++]=(char)0xDB; 118 OpBuffer[obp++]=(char)0x5C; 119 OpBuffer[obp++]=(char)0x24; 120 OpBuffer[obp++]=(char)0x04; 119 compiler.codeGenerator.PutOld( 120 (char)0xDB, 121 (char)0x5C, 122 (char)0x24, 123 (char)0x04 124 ); 121 125 122 126 //fldcw word ptr[esp] 123 OpBuffer[obp++]=(char)0xD9; 124 OpBuffer[obp++]=(char)0x2C; 125 OpBuffer[obp++]=(char)0x24; 127 compiler.codeGenerator.PutOld( 128 (char)0xD9, 129 (char)0x2C, 130 (char)0x24 131 ); 126 132 127 133 //add esp,4 … … 307 313 308 314 //mov eax,ProcAddr 309 OpBuffer[obp++]=(char)0xB8; 310 pobj_SubAddrSchedule->add(pUserProc,0); 311 obp+=sizeof(long); 315 compiler.codeGenerator.op_addressof( REG_EAX, pUserProc ); 312 316 } 313 317
Note:
See TracChangeset
for help on using the changeset viewer.