VirtualBox

Changeset 11464 in vbox for trunk


Ignore:
Timestamp:
Aug 18, 2008 1:19:26 PM (16 years ago)
Author:
vboxsync
Message:

Iz means sign extend to 64 bits, not zero extend.

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

Legend:

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

    r11462 r11464  
    13241324    else
    13251325    {
    1326         pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    1327         /* 64 bits op mode means zero extend to 64 bits. */
     1326        /* 64 bits op mode means *sign* extend to 64 bits. */
    13281327        if (pCpu->opmode == CPUMODE_64BIT)
    13291328        {
     1329            pParam->parval = (uint64_t)(int32_t)DISReadDWord(pCpu, lpszCodeBlock);           
    13301330            pParam->flags |= USE_IMMEDIATE64;
    13311331            pParam->size   = sizeof(uint64_t);
     1332            disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%VX64h", pParam->parval);
    13321333        }
    13331334        else
    13341335        {
     1336            pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    13351337            pParam->flags |= USE_IMMEDIATE32;
    13361338            pParam->size   = sizeof(uint32_t);
    1337         }
    1338 
    1339         disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval);
     1339            disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "0%08Xh", (uint32_t)pParam->parval);
     1340        }
    13401341        return sizeof(uint32_t);
    13411342    }
  • trunk/src/VBox/Disassembler/DisasmTestA.asm

    r11462 r11464  
    7171align 16
    7272BEGINPROC TestProc64
     73      db 48h
     74      db 0c7h
     75      db 42h
     76      db 18h
     77      db 20h
     78      db 3eh
     79      db 23h
     80      db 80h
    7381      call qword [r8+10h]
    7482      ; test
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