VirtualBox

Changeset 73508 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 5, 2018 2:11:15 PM (6 years ago)
Author:
vboxsync
Message:

Disasm: GCC 8.2.0 fixes

File:
1 edited

Legend:

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

    r69111 r73508  
    340340DISDECL(int) DISFetchReg8(PCCPUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal)
    341341{
    342     AssertReturn(reg8 < RT_ELEMENTS(g_aReg8Index), VERR_INVALID_PARAMETER);
     342    AssertReturnStmt(reg8 < RT_ELEMENTS(g_aReg8Index), *pVal, VERR_INVALID_PARAMETER);
    343343
    344344    *pVal = DIS_READ_REG8(pCtx, reg8);
     
    352352DISDECL(int) DISFetchReg16(PCCPUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal)
    353353{
    354     AssertReturn(reg16 < RT_ELEMENTS(g_aReg16Index), VERR_INVALID_PARAMETER);
     354    AssertReturnStmt(reg16 < RT_ELEMENTS(g_aReg16Index), *pVal = 0, VERR_INVALID_PARAMETER);
    355355
    356356    *pVal = DIS_READ_REG16(pCtx, reg16);
     
    364364DISDECL(int) DISFetchReg32(PCCPUMCTXCORE pCtx, unsigned reg32, uint32_t *pVal)
    365365{
    366     AssertReturn(reg32 < RT_ELEMENTS(g_aReg32Index), VERR_INVALID_PARAMETER);
     366    AssertReturnStmt(reg32 < RT_ELEMENTS(g_aReg32Index), *pVal = 0, VERR_INVALID_PARAMETER);
    367367
    368368    *pVal = DIS_READ_REG32(pCtx, reg32);
     
    376376DISDECL(int) DISFetchReg64(PCCPUMCTXCORE pCtx, unsigned reg64, uint64_t *pVal)
    377377{
    378     AssertReturn(reg64 < RT_ELEMENTS(g_aReg64Index), VERR_INVALID_PARAMETER);
     378    AssertReturnStmt(reg64 < RT_ELEMENTS(g_aReg64Index), *pVal = 0, VERR_INVALID_PARAMETER);
    379379
    380380    *pVal = DIS_READ_REG64(pCtx, reg64);
     
    388388DISDECL(int) DISPtrReg8(PCPUMCTXCORE pCtx, unsigned reg8, uint8_t **ppReg)
    389389{
    390     AssertReturn(reg8 < RT_ELEMENTS(g_aReg8Index), VERR_INVALID_PARAMETER);
     390    AssertReturnStmt(reg8 < RT_ELEMENTS(g_aReg8Index), *ppReg = NULL, VERR_INVALID_PARAMETER);
    391391
    392392    *ppReg = DIS_PTR_REG8(pCtx, reg8);
     
    400400DISDECL(int) DISPtrReg16(PCPUMCTXCORE pCtx, unsigned reg16, uint16_t **ppReg)
    401401{
    402     AssertReturn(reg16 < RT_ELEMENTS(g_aReg16Index), VERR_INVALID_PARAMETER);
     402    AssertReturnStmt(reg16 < RT_ELEMENTS(g_aReg16Index), *ppReg = NULL, VERR_INVALID_PARAMETER);
    403403
    404404    *ppReg = DIS_PTR_REG16(pCtx, reg16);
     
    408408/**
    409409 * Returns the pointer to the specified 32 bits general purpose register
    410  *
    411410 */
    412411DISDECL(int) DISPtrReg32(PCPUMCTXCORE pCtx, unsigned reg32, uint32_t **ppReg)
    413412{
    414     AssertReturn(reg32 < RT_ELEMENTS(g_aReg32Index), VERR_INVALID_PARAMETER);
     413    AssertReturnStmt(reg32 < RT_ELEMENTS(g_aReg32Index), *ppReg = NULL, VERR_INVALID_PARAMETER);
    415414
    416415    *ppReg = DIS_PTR_REG32(pCtx, reg32);
     
    420419/**
    421420 * Returns the pointer to the specified 64 bits general purpose register
    422  *
    423421 */
    424422DISDECL(int) DISPtrReg64(PCPUMCTXCORE pCtx, unsigned reg64, uint64_t **ppReg)
    425423{
    426     AssertReturn(reg64 < RT_ELEMENTS(g_aReg64Index), VERR_INVALID_PARAMETER);
     424    AssertReturnStmt(reg64 < RT_ELEMENTS(g_aReg64Index), *ppReg = NULL, VERR_INVALID_PARAMETER);
    427425
    428426    *ppReg = DIS_PTR_REG64(pCtx, reg64);
     
    432430/**
    433431 * Returns the value of the specified segment register
    434  *
    435432 */
    436433DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DISSELREG sel, RTSEL *pVal)
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