Changeset 9012 in vbox for trunk/src/VBox
- Timestamp:
- May 21, 2008 11:16:28 AM (17 years ago)
- Location:
- trunk/src/VBox/Disassembler
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r8999 r9012 1133 1133 pParam->parval = DISReadByte(pCpu, lpszCodeBlock); 1134 1134 pParam->flags |= USE_IMMEDIATE8; 1135 pParam->size = sizeof(uint8_t); 1135 1136 1136 1137 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%02Xh", (uint32_t)pParam->parval); … … 1151 1152 pParam->parval = (uint32_t)(int8_t)DISReadByte(pCpu, lpszCodeBlock); 1152 1153 pParam->flags |= USE_IMMEDIATE32_SX8; 1154 pParam->size = sizeof(uint32_t); 1153 1155 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval); 1154 1156 } … … 1157 1159 pParam->parval = (uint16_t)(int8_t)DISReadByte(pCpu, lpszCodeBlock); 1158 1160 pParam->flags |= USE_IMMEDIATE16_SX8; 1161 pParam->size = sizeof(uint16_t); 1159 1162 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint16_t)pParam->parval); 1160 1163 } … … 1173 1176 pParam->parval = DISReadWord(pCpu, lpszCodeBlock); 1174 1177 pParam->flags |= USE_IMMEDIATE16; 1178 pParam->size = sizeof(uint16_t); 1175 1179 1176 1180 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint16_t)pParam->parval); … … 1189 1193 pParam->parval = DISReadDWord(pCpu, lpszCodeBlock); 1190 1194 pParam->flags |= USE_IMMEDIATE32; 1195 pParam->size = sizeof(uint32_t); 1191 1196 1192 1197 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval); … … 1205 1210 pParam->parval = DISReadQWord(pCpu, lpszCodeBlock); 1206 1211 pParam->flags |= USE_IMMEDIATE64; 1212 pParam->size = sizeof(uint64_t); 1207 1213 1208 1214 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08X", (uint32_t)pParam->parval); … … 1224 1230 pParam->parval = DISReadDWord(pCpu, lpszCodeBlock); 1225 1231 pParam->flags |= USE_IMMEDIATE32; 1232 pParam->size = sizeof(uint32_t); 1226 1233 1227 1234 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval); … … 1233 1240 pParam->parval = DISReadQWord(pCpu, lpszCodeBlock); 1234 1241 pParam->flags |= USE_IMMEDIATE64; 1242 pParam->size = sizeof(uint64_t); 1235 1243 1236 1244 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%VX64h", pParam->parval); … … 1241 1249 pParam->parval = DISReadWord(pCpu, lpszCodeBlock); 1242 1250 pParam->flags |= USE_IMMEDIATE16; 1251 pParam->size = sizeof(uint16_t); 1243 1252 1244 1253 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint32_t)pParam->parval); … … 1267 1276 pParam->parval = DISReadWord(pCpu, lpszCodeBlock); 1268 1277 pParam->flags |= USE_IMMEDIATE16; 1278 pParam->size = sizeof(uint16_t); 1269 1279 1270 1280 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint32_t)pParam->parval); … … 1275 1285 pParam->parval = DISReadDWord(pCpu, lpszCodeBlock); 1276 1286 pParam->flags |= USE_IMMEDIATE32; 1287 pParam->size = sizeof(uint32_t); 1277 1288 1278 1289 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval); … … 1297 1308 pParam->parval = DISReadByte(pCpu, lpszCodeBlock); 1298 1309 pParam->flags |= USE_IMMEDIATE8_REL; 1310 pParam->size = sizeof(uint8_t); 1299 1311 1300 1312 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%02Xh)", (uint32_t)pParam->parval); … … 1317 1329 pParam->parval = DISReadDWord(pCpu, lpszCodeBlock); 1318 1330 pParam->flags |= USE_IMMEDIATE32_REL; 1331 pParam->size = sizeof(int32_t); 1319 1332 1320 1333 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%08Xh)", (uint32_t)pParam->parval); … … 1326 1339 pParam->parval = DISReadQWord(pCpu, lpszCodeBlock); 1327 1340 pParam->flags |= USE_IMMEDIATE64_REL; 1341 pParam->size = sizeof(int64_t); 1328 1342 1329 1343 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%VX64h)", pParam->parval); … … 1334 1348 pParam->parval = DISReadWord(pCpu, lpszCodeBlock); 1335 1349 pParam->flags |= USE_IMMEDIATE16_REL; 1350 pParam->size = sizeof(int16_t); 1336 1351 1337 1352 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%04Xh)", (uint32_t)pParam->parval); … … 1363 1378 *((uint32_t*)&pParam->parval+1) = DISReadWord(pCpu, lpszCodeBlock+sizeof(uint32_t)); 1364 1379 pParam->flags |= USE_IMMEDIATE_ADDR_16_32; 1380 pParam->size = sizeof(uint16_t) + sizeof(uint32_t); 1365 1381 1366 1382 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04X:0%08Xh", (uint32_t)(pParam->parval>>32), (uint32_t)pParam->parval); … … 1375 1391 pParam->disp32 = DISReadDWord(pCpu, lpszCodeBlock); 1376 1392 pParam->flags |= USE_DISPLACEMENT32; 1393 pParam->size = sizeof(uint32_t); 1377 1394 1378 1395 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "[0%08Xh]", pParam->disp32); … … 1391 1408 pParam->disp64 = DISReadQWord(pCpu, lpszCodeBlock); 1392 1409 pParam->flags |= USE_DISPLACEMENT64; 1410 pParam->size = sizeof(uint64_t); 1393 1411 1394 1412 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "[0%08X%08Xh]", (uint32_t)(pParam->disp64 >> 32), (uint32_t)pParam->disp64); … … 1401 1419 pParam->parval = DISReadDWord(pCpu, lpszCodeBlock); 1402 1420 pParam->flags |= USE_IMMEDIATE_ADDR_16_16; 1421 pParam->size = 2*sizeof(uint16_t); 1403 1422 1404 1423 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04X:0%04Xh", (uint32_t)(pParam->parval>>16), (uint16_t)pParam->parval ); … … 1413 1432 pParam->disp16 = DISReadWord(pCpu, lpszCodeBlock); 1414 1433 pParam->flags |= USE_DISPLACEMENT16; 1434 pParam->size = sizeof(uint16_t); 1415 1435 1416 1436 disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "[0%04Xh]", (uint32_t)pParam->disp16); -
trunk/src/VBox/Disassembler/DisasmTest.cpp
r9007 r9012 57 57 cpu.mode = CPUMODE_32BIT; 58 58 if (VBOX_SUCCESS(DISInstr(&cpu, pInstr, 0, &cb, szOutput))) 59 { 59 60 printf(szOutput); 61 } 60 62 else 61 63 { -
trunk/src/VBox/Disassembler/DisasmTestA.asm
r8999 r9012 34 34 align 16 35 35 BEGINPROC TestProc 36 mov word [edi], 0123ah 36 37 movzx eax,byte [edx] 37 38 movzx eax,word [edx]
Note:
See TracChangeset
for help on using the changeset viewer.