VirtualBox

Changeset 9012 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 21, 2008 11:16:28 AM (17 years ago)
Author:
vboxsync
Message:

Fill in parameter size values.

Location:
trunk/src/VBox/Disassembler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r8999 r9012  
    11331133    pParam->parval = DISReadByte(pCpu, lpszCodeBlock);
    11341134    pParam->flags |= USE_IMMEDIATE8;
     1135    pParam->size   = sizeof(uint8_t);
    11351136
    11361137    disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%02Xh", (uint32_t)pParam->parval);
     
    11511152        pParam->parval = (uint32_t)(int8_t)DISReadByte(pCpu, lpszCodeBlock);
    11521153        pParam->flags |= USE_IMMEDIATE32_SX8;
     1154        pParam->size   = sizeof(uint32_t);
    11531155        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval);
    11541156    }
     
    11571159        pParam->parval = (uint16_t)(int8_t)DISReadByte(pCpu, lpszCodeBlock);
    11581160        pParam->flags |= USE_IMMEDIATE16_SX8;
     1161        pParam->size   = sizeof(uint16_t);
    11591162        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint16_t)pParam->parval);
    11601163    }
     
    11731176    pParam->parval = DISReadWord(pCpu, lpszCodeBlock);
    11741177    pParam->flags |= USE_IMMEDIATE16;
     1178    pParam->size   = sizeof(uint16_t);
    11751179
    11761180    disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint16_t)pParam->parval);
     
    11891193    pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    11901194    pParam->flags |= USE_IMMEDIATE32;
     1195    pParam->size   = sizeof(uint32_t);
    11911196
    11921197    disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval);
     
    12051210    pParam->parval = DISReadQWord(pCpu, lpszCodeBlock);
    12061211    pParam->flags |= USE_IMMEDIATE64;
     1212    pParam->size   = sizeof(uint64_t);
    12071213
    12081214    disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08X", (uint32_t)pParam->parval);
     
    12241230        pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    12251231        pParam->flags |= USE_IMMEDIATE32;
     1232        pParam->size   = sizeof(uint32_t);
    12261233
    12271234        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval);
     
    12331240        pParam->parval = DISReadQWord(pCpu, lpszCodeBlock);
    12341241        pParam->flags |= USE_IMMEDIATE64;
     1242        pParam->size   = sizeof(uint64_t);
    12351243
    12361244        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%VX64h", pParam->parval);
     
    12411249        pParam->parval = DISReadWord(pCpu, lpszCodeBlock);
    12421250        pParam->flags |= USE_IMMEDIATE16;
     1251        pParam->size   = sizeof(uint16_t);
    12431252
    12441253        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint32_t)pParam->parval);
     
    12671276        pParam->parval = DISReadWord(pCpu, lpszCodeBlock);
    12681277        pParam->flags |= USE_IMMEDIATE16;
     1278        pParam->size   = sizeof(uint16_t);
    12691279
    12701280        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04Xh", (uint32_t)pParam->parval);
     
    12751285        pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    12761286        pParam->flags |= USE_IMMEDIATE32;
     1287        pParam->size   = sizeof(uint32_t);
    12771288
    12781289        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval);
     
    12971308    pParam->parval = DISReadByte(pCpu, lpszCodeBlock);
    12981309    pParam->flags |= USE_IMMEDIATE8_REL;
     1310    pParam->size   = sizeof(uint8_t);
    12991311
    13001312    disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%02Xh)", (uint32_t)pParam->parval);
     
    13171329        pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    13181330        pParam->flags |= USE_IMMEDIATE32_REL;
     1331        pParam->size   = sizeof(int32_t);
    13191332
    13201333        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%08Xh)", (uint32_t)pParam->parval);
     
    13261339        pParam->parval = DISReadQWord(pCpu, lpszCodeBlock);
    13271340        pParam->flags |= USE_IMMEDIATE64_REL;
     1341        pParam->size   = sizeof(int64_t);
    13281342
    13291343        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%VX64h)", pParam->parval);
     
    13341348        pParam->parval = DISReadWord(pCpu, lpszCodeBlock);
    13351349        pParam->flags |= USE_IMMEDIATE16_REL;
     1350        pParam->size   = sizeof(int16_t);
    13361351
    13371352        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), " (0%04Xh)", (uint32_t)pParam->parval);
     
    13631378            *((uint32_t*)&pParam->parval+1) = DISReadWord(pCpu, lpszCodeBlock+sizeof(uint32_t));
    13641379            pParam->flags  |= USE_IMMEDIATE_ADDR_16_32;
     1380            pParam->size   = sizeof(uint16_t) + sizeof(uint32_t);
    13651381
    13661382            disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04X:0%08Xh", (uint32_t)(pParam->parval>>32), (uint32_t)pParam->parval);
     
    13751391            pParam->disp32 = DISReadDWord(pCpu, lpszCodeBlock);
    13761392            pParam->flags |= USE_DISPLACEMENT32;
     1393            pParam->size   = sizeof(uint32_t);
    13771394
    13781395            disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "[0%08Xh]", pParam->disp32);
     
    13911408        pParam->disp64 = DISReadQWord(pCpu, lpszCodeBlock);
    13921409        pParam->flags |= USE_DISPLACEMENT64;
     1410        pParam->size   = sizeof(uint64_t);
    13931411
    13941412        disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "[0%08X%08Xh]", (uint32_t)(pParam->disp64 >> 32), (uint32_t)pParam->disp64);
     
    14011419            pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    14021420            pParam->flags |= USE_IMMEDIATE_ADDR_16_16;
     1421            pParam->size   = 2*sizeof(uint16_t);
    14031422
    14041423            disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%04X:0%04Xh", (uint32_t)(pParam->parval>>16), (uint16_t)pParam->parval );
     
    14131432            pParam->disp16 = DISReadWord(pCpu, lpszCodeBlock);
    14141433            pParam->flags |= USE_DISPLACEMENT16;
     1434            pParam->size   = sizeof(uint16_t);
    14151435
    14161436            disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "[0%04Xh]", (uint32_t)pParam->disp16);
  • trunk/src/VBox/Disassembler/DisasmTest.cpp

    r9007 r9012  
    5757            cpu.mode = CPUMODE_32BIT;
    5858            if (VBOX_SUCCESS(DISInstr(&cpu, pInstr, 0, &cb, szOutput)))
     59            {
    5960                printf(szOutput);
     61            }
    6062            else
    6163            {
  • trunk/src/VBox/Disassembler/DisasmTestA.asm

    r8999 r9012  
    3434align 16
    3535BEGINPROC   TestProc
     36      mov   word [edi], 0123ah
    3637      movzx eax,byte  [edx]
    3738      movzx eax,word  [edx]
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette