VirtualBox

Changeset 62594 in vbox for trunk/src/VBox/Disassembler


Ignore:
Timestamp:
Jul 27, 2016 2:32:14 PM (8 years ago)
Author:
vboxsync
Message:

warnings

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

Legend:

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

    r62479 r62594  
    236236{
    237237#ifdef IN_RING0
    238     NOREF(cbMinRead);
     238    RT_NOREF_PV(cbMinRead);
    239239    AssertMsgFailed(("disReadWord with no read callback in ring 0!!\n"));
    240240    RT_BZERO(&pDis->abInstr[offInstr], cbMaxRead);
     
    639639{
    640640    PCDISOPCODE fpop;
    641     NOREF(pOp);
     641    RT_NOREF_PV(pOp);
    642642
    643643    uint8_t    ModRM = disReadByte(pDis, offInstr);
     
    760760static size_t ParseSIB(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    761761{
    762     NOREF(pOp); NOREF(pParam);
     762    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    763763
    764764    uint8_t SIB = disReadByte(pDis, offInstr);
     
    791791static size_t ParseSIB_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    792792{
    793     NOREF(pOp); NOREF(pParam);
     793    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    794794
    795795    uint8_t SIB = disReadByte(pDis, offInstr);
     
    830830static void disasmModRMReg(unsigned idx, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam, int fRegAddr)
    831831{
    832     NOREF(pOp); NOREF(pDis);
     832    RT_NOREF_PV(pOp); RT_NOREF_PV(pDis);
    833833
    834834#ifdef LOG_ENABLED
     
    909909    { DISGREG_BX, DISGREG_BX, DISGREG_BP, DISGREG_BP, DISGREG_SI, DISGREG_DI, DISGREG_BP, DISGREG_BX };
    910910
    911     NOREF(pDis); NOREF(pOp);
     911    RT_NOREF_PV(pDis); RT_NOREF_PV(pOp);
    912912    pParam->fUse |= DISUSE_REG_GEN16;
    913913    pParam->Base.idxGenReg = s_auBaseModRMReg16[idx];
     
    923923static void disasmModRMSReg(unsigned idx, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    924924{
    925     NOREF(pOp);
     925    RT_NOREF_PV(pOp);
    926926    if (idx >= DISSELREG_END)
    927927    {
     
    12671267static size_t ParseIllegal(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    12681268{
    1269     NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1269    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    12701270    AssertFailed();
    12711271    return offInstr;
     
    13591359static size_t ParseModFence(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    13601360{
    1361     NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1361    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    13621362    /* Note! Only used in group 15, so we must account for the mod/rm byte. */
    13631363    return offInstr + 1;
     
    13671367static size_t ParseImmByte(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    13681368{
    1369     NOREF(pOp);
     1369    RT_NOREF_PV(pOp);
    13701370    uint8_t byte = disReadByte(pDis, offInstr);
    13711371    if (pParam->fParam == OP_PARM_Lx)
     
    13911391static size_t ParseImmByte_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    13921392{
    1393     NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1393    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    13941394    return offInstr + 1;
    13951395}
     
    13981398static size_t ParseImmByteSX(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    13991399{
    1400     NOREF(pOp);
     1400    RT_NOREF_PV(pOp);
    14011401    if (pDis->uOpMode == DISCPUMODE_32BIT)
    14021402    {
     
    14241424static size_t ParseImmByteSX_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14251425{
    1426     NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1426    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    14271427    return offInstr + 1;
    14281428}
     
    14311431static size_t ParseImmUshort(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14321432{
    1433     NOREF(pOp);
     1433    RT_NOREF_PV(pOp);
    14341434    pParam->uValue = disReadWord(pDis, offInstr);
    14351435    pParam->fUse  |= DISUSE_IMMEDIATE16;
     
    14411441static size_t ParseImmUshort_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14421442{
    1443     NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1443    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    14441444    return offInstr + 2;
    14451445}
     
    14481448static size_t ParseImmUlong(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14491449{
    1450     NOREF(pOp);
     1450    RT_NOREF_PV(pOp);
    14511451    pParam->uValue = disReadDWord(pDis, offInstr);
    14521452    pParam->fUse  |= DISUSE_IMMEDIATE32;
     
    14581458static size_t ParseImmUlong_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14591459{
    1460     NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1460    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    14611461    return offInstr + 4;
    14621462}
     
    14651465static size_t ParseImmQword(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14661466{
    1467     NOREF(pOp);
     1467    RT_NOREF_PV(pOp);
    14681468    pParam->uValue = disReadQWord(pDis, offInstr);
    14691469    pParam->fUse  |= DISUSE_IMMEDIATE64;
     
    14751475static size_t ParseImmQword_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14761476{
    1477     NOREF(offInstr); NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1477    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    14781478    return offInstr + 8;
    14791479}
     
    14821482static size_t ParseImmV(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    14831483{
    1484     NOREF(pOp);
     1484    RT_NOREF_PV(pOp);
    14851485    if (pDis->uOpMode == DISCPUMODE_32BIT)
    14861486    {
     
    15081508static size_t ParseImmV_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    15091509{
    1510     NOREF(offInstr); NOREF(pOp); NOREF(pParam);
     1510    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    15111511    if (pDis->uOpMode == DISCPUMODE_32BIT)
    15121512        return offInstr + 4;
     
    15191519static size_t ParseImmZ(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    15201520{
    1521     NOREF(pOp);
     1521    RT_NOREF_PV(pOp);
    15221522    /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */
    15231523    if (pDis->uOpMode == DISCPUMODE_16BIT)
     
    15481548static size_t ParseImmZ_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    15491549{
    1550     NOREF(offInstr); NOREF(pOp); NOREF(pParam);
     1550    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    15511551    /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */
    15521552    if (pDis->uOpMode == DISCPUMODE_16BIT)
     
    15601560static size_t ParseImmBRel(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    15611561{
    1562     NOREF(pOp);
     1562    RT_NOREF_PV(pOp);
    15631563    pParam->uValue = disReadByte(pDis, offInstr);
    15641564    pParam->fUse  |= DISUSE_IMMEDIATE8_REL;
     
    15711571static size_t ParseImmBRel_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    15721572{
    1573     NOREF(offInstr); NOREF(pOp); NOREF(pParam); NOREF(pDis);
     1573    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
    15741574    return offInstr + 1;
    15751575}
     
    15791579static size_t ParseImmVRel(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    15801580{
    1581     NOREF(pOp);
     1581    RT_NOREF_PV(pOp);
    15821582    if (pDis->uOpMode == DISCPUMODE_32BIT)
    15831583    {
     
    16071607static size_t ParseImmVRel_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    16081608{
    1609     NOREF(offInstr); NOREF(pOp); NOREF(pParam);
     1609    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    16101610    if (pDis->uOpMode == DISCPUMODE_16BIT)
    16111611        return offInstr + 2;
     
    16171617static size_t ParseImmAddr(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    16181618{
    1619     NOREF(pOp);
     1619    RT_NOREF_PV(pOp);
    16201620    if (pDis->uAddrMode == DISCPUMODE_32BIT)
    16211621    {
     
    16801680static size_t ParseImmAddr_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    16811681{
    1682     NOREF(offInstr); NOREF(pOp);
     1682    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp);
    16831683    if (pDis->uAddrMode == DISCPUMODE_32BIT)
    16841684    {
     
    17001700static size_t ParseImmAddrF(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    17011701{
    1702     NOREF(pOp);
     1702    RT_NOREF_PV(pOp);
    17031703    // immediate far pointers - only 16:16 or 16:32; determined by operand, *not* address size!
    17041704    Assert(pDis->uOpMode == DISCPUMODE_16BIT || pDis->uOpMode == DISCPUMODE_32BIT);
     
    17241724static size_t ParseImmAddrF_SizeOnly(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    17251725{
    1726     NOREF(offInstr); NOREF(pOp);
     1726    RT_NOREF_PV(offInstr); RT_NOREF_PV(pOp);
    17271727    // immediate far pointers - only 16:16 or 16:32
    17281728    Assert(pDis->uOpMode == DISCPUMODE_16BIT || pDis->uOpMode == DISCPUMODE_32BIT);
    1729     Assert(OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p);
     1729    Assert(OP_PARM_VSUBTYPE(pParam->fParam) == OP_PARM_p); RT_NOREF_PV(pParam);
    17301730    if (pDis->uOpMode == DISCPUMODE_32BIT)
    17311731        return offInstr + 4 + 2;    /* far 16:32 pointer */
     
    17361736static size_t ParseFixedReg(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    17371737{
    1738     NOREF(offInstr);
     1738    RT_NOREF_PV(offInstr);
    17391739
    17401740    /*
     
    18381838static size_t ParseXv(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    18391839{
    1840     NOREF(pOp);
     1840    RT_NOREF_PV(pOp);
    18411841
    18421842    pParam->fUse |= DISUSE_POINTER_DS_BASED;
     
    18631863static size_t ParseXb(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    18641864{
    1865     NOREF(pOp);
     1865    RT_NOREF_PV(pOp);
    18661866
    18671867    pParam->fUse |= DISUSE_POINTER_DS_BASED;
     
    18881888static size_t ParseYv(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    18891889{
    1890     NOREF(pOp);
     1890    RT_NOREF_PV(pOp);
    18911891
    18921892    pParam->fUse |= DISUSE_POINTER_ES_BASED;
     
    19131913static size_t ParseYb(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    19141914{
    1915     NOREF(pOp);
     1915    RT_NOREF_PV(pOp);
    19161916
    19171917    pParam->fUse |= DISUSE_POINTER_ES_BASED;
     
    19381938static size_t ParseInvOpModRm(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    19391939{
    1940     NOREF(pOp); NOREF(pDis); NOREF(pParam);
     1940    RT_NOREF_PV(pOp); RT_NOREF_PV(pDis); RT_NOREF_PV(pParam);
    19411941    /* This is used to avoid a bunch of special hacks to get the ModRM byte
    19421942       included when encountering invalid opcodes in groups. */
     
    19471947static size_t ParseVexDest(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    19481948{
    1949     NOREF(pOp);
     1949    RT_NOREF_PV(pOp);
    19501950
    19511951    unsigned type = OP_PARM_VTYPE(pParam->fParam);
     
    19811981static size_t ParseTwoByteEsc(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    19821982{
    1983     NOREF(pOp); NOREF(pParam);
     1983    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    19841984
    19851985    /* 2nd byte */
     
    20442044static size_t ParseThreeByteEsc4(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    20452045{
    2046     NOREF(pOp); NOREF(pParam);
     2046    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    20472047
    20482048    /* 3rd byte */
     
    21462146static size_t ParseThreeByteEsc5(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    21472147{
    2148     NOREF(pOp); NOREF(pParam);
     2148    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    21492149
    21502150    /* 3rd byte */
     
    21902190static size_t ParseNopPause(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    21912191{
    2192     NOREF(pParam);
     2192    RT_NOREF_PV(pParam);
    21932193
    21942194    if (pDis->fPrefix & DISPREFIX_REP)
     
    22062206static size_t ParseImmGrpl(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    22072207{
    2208     NOREF(pParam);
     2208    RT_NOREF_PV(pParam);
    22092209
    22102210    uint8_t  modrm = disReadByte(pDis, offInstr);
     
    22202220static size_t ParseShiftGrp2(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    22212221{
    2222     NOREF(pParam);
     2222    RT_NOREF_PV(pParam);
    22232223
    22242224    unsigned idx;
     
    22552255{
    22562256    unsigned idx = (pDis->bOpCode - 0xF6) * 8;
    2257     NOREF(pParam);
     2257    RT_NOREF_PV(pParam);
    22582258
    22592259    uint8_t modrm = disReadByte(pDis, offInstr);
     
    22682268static size_t ParseGrp4(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    22692269{
    2270     NOREF(pParam);
     2270    RT_NOREF_PV(pParam);
    22712271
    22722272    uint8_t modrm = disReadByte(pDis, offInstr);
     
    22812281static size_t ParseGrp5(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    22822282{
    2283     NOREF(pParam);
     2283    RT_NOREF_PV(pParam);
    22842284
    22852285    uint8_t modrm = disReadByte(pDis, offInstr);
     
    23152315    AssertMsg(offStrict == offRet - 1  /* the imm8_opcode */ || pOp->uOpcode == OP_INVALID,
    23162316              ("offStrict=%#x offRet=%#x uOpCode=%u\n", offStrict, offRet, pOp->uOpcode));
    2317     NOREF(offStrict);
     2317    RT_NOREF_PV(offStrict);
    23182318
    23192319    return offRet;
     
    23232323static size_t ParseGrp6(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    23242324{
    2325     NOREF(pParam);
     2325    RT_NOREF_PV(pParam);
    23262326
    23272327    uint8_t modrm = disReadByte(pDis, offInstr);
     
    23362336static size_t ParseGrp7(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    23372337{
    2338     NOREF(pParam);
     2338    RT_NOREF_PV(pParam);
    23392339
    23402340    uint8_t modrm = disReadByte(pDis, offInstr);
     
    23622362static size_t ParseGrp8(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    23632363{
    2364     NOREF(pParam);
     2364    RT_NOREF_PV(pParam);
    23652365
    23662366    uint8_t modrm = disReadByte(pDis, offInstr);
     
    23752375static size_t ParseGrp9(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    23762376{
    2377     NOREF(pParam);
     2377    RT_NOREF_PV(pParam);
    23782378
    23792379    uint8_t modrm = disReadByte(pDis, offInstr);
     
    23882388static size_t ParseGrp10(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    23892389{
    2390     NOREF(pParam);
     2390    RT_NOREF_PV(pParam);
    23912391
    23922392    uint8_t modrm = disReadByte(pDis, offInstr);
     
    24012401static size_t ParseGrp12(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    24022402{
    2403     NOREF(pParam);
     2403    RT_NOREF_PV(pParam);
    24042404
    24052405    uint8_t modrm = disReadByte(pDis, offInstr);
     
    24172417static size_t ParseGrp13(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    24182418{
    2419     NOREF(pParam);
     2419    RT_NOREF_PV(pParam);
    24202420
    24212421    uint8_t modrm = disReadByte(pDis, offInstr);
     
    24322432static size_t ParseGrp14(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    24332433{
    2434     NOREF(pParam);
     2434    RT_NOREF_PV(pParam);
    24352435
    24362436    uint8_t modrm = disReadByte(pDis, offInstr);
     
    24472447static size_t ParseGrp15(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    24482448{
    2449     NOREF(pParam);
     2449    RT_NOREF_PV(pParam);
    24502450
    24512451    uint8_t modrm = disReadByte(pDis, offInstr);
     
    24652465static size_t ParseGrp16(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    24662466{
    2467     NOREF(pParam);
     2467    RT_NOREF_PV(pParam);
    24682468
    24692469    uint8_t modrm = disReadByte(pDis, offInstr);
     
    24762476static size_t ParseVex2b(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    24772477{
    2478     NOREF(pOp); NOREF(pParam);
     2478    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    24792479
    24802480    PCDISOPCODE pOpCode = &g_InvalidOpcode[0];
     
    25232523static size_t ParseVex3b(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam)
    25242524{
    2525     NOREF(pOp); NOREF(pParam);
     2525    RT_NOREF_PV(pOp); RT_NOREF_PV(pParam);
    25262526
    25272527    PCDISOPCODE pOpCode = NULL;
  • trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp

    r62479 r62594  
    9797static const char *disasmFormatYasmBaseReg(PCDISSTATE pDis, PCDISOPPARAM pParam, size_t *pcchReg)
    9898{
     99    RT_NOREF_PV(pDis);
     100
    99101    switch (pParam->fUse & (  DISUSE_REG_GEN8 | DISUSE_REG_GEN16 | DISUSE_REG_GEN32 | DISUSE_REG_GEN64
    100102                            | DISUSE_REG_FP   | DISUSE_REG_MMX   | DISUSE_REG_XMM   | DISUSE_REG_YMM
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