VirtualBox

Changeset 99933 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
May 23, 2023 12:18:13 PM (20 months ago)
Author:
vboxsync
Message:

VMM/IEM: A couple of clang warning fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInline.h

    r99300 r99933  
    589589        return iemOpcodeGetNextS8SxU16Slow(pVCpu, pu16);
    590590
    591     *pu16 = (int8_t)pVCpu->iem.s.abOpcode[offOpcode];
     591    *pu16 = (uint16_t)(int16_t)(int8_t)pVCpu->iem.s.abOpcode[offOpcode];
    592592    pVCpu->iem.s.offOpcode = offOpcode + 1;
    593593    return VINF_SUCCESS;
     
    611611    } while (0)
    612612# else
    613 #  define IEM_OPCODE_GET_NEXT_S8_SX_U16(a_pu16) (*(a_pu16) = (int8_t)iemOpcodeGetNextU8Jmp(pVCpu))
     613#  define IEM_OPCODE_GET_NEXT_S8_SX_U16(a_pu16) (*(a_pu16) = (uint16_t)(int16_t)(int8_t)iemOpcodeGetNextU8Jmp(pVCpu))
    614614# endif
    615615
     
    629629        return iemOpcodeGetNextS8SxU32Slow(pVCpu, pu32);
    630630
    631     *pu32 = (int8_t)pVCpu->iem.s.abOpcode[offOpcode];
     631    *pu32 = (uint32_t)(int32_t)(int8_t)pVCpu->iem.s.abOpcode[offOpcode];
    632632    pVCpu->iem.s.offOpcode = offOpcode + 1;
    633633    return VINF_SUCCESS;
     
    651651    } while (0)
    652652# else
    653 #  define IEM_OPCODE_GET_NEXT_S8_SX_U32(a_pu32) (*(a_pu32) = (int8_t)iemOpcodeGetNextU8Jmp(pVCpu))
     653#  define IEM_OPCODE_GET_NEXT_S8_SX_U32(a_pu32) (*(a_pu32) = (uint32_t)(int32_t)(int8_t)iemOpcodeGetNextU8Jmp(pVCpu))
    654654# endif
    655655
     
    670670        return iemOpcodeGetNextS8SxU64Slow(pVCpu, pu64);
    671671
    672     *pu64 = (int8_t)pVCpu->iem.s.abOpcode[offOpcode];
     672    *pu64 = (uint64_t)(int64_t)(int8_t)pVCpu->iem.s.abOpcode[offOpcode];
    673673    pVCpu->iem.s.offOpcode = offOpcode + 1;
    674674    return VINF_SUCCESS;
     
    692692    } while (0)
    693693# else
    694 #  define IEM_OPCODE_GET_NEXT_S8_SX_U64(a_pu64) (*(a_pu64) = (int8_t)iemOpcodeGetNextU8Jmp(pVCpu))
     694#  define IEM_OPCODE_GET_NEXT_S8_SX_U64(a_pu64) (*(a_pu64) = (uint64_t)(int64_t)(int8_t)iemOpcodeGetNextU8Jmp(pVCpu))
    695695# endif
    696696
     
    11551155                                      pVCpu->iem.s.abOpcode[offOpcode + 2],
    11561156                                      pVCpu->iem.s.abOpcode[offOpcode + 3]);
    1157     *pu64 = i32;
     1157    *pu64 = (uint64_t)(int64_t)i32;
    11581158    pVCpu->iem.s.offOpcode = offOpcode + 4;
    11591159    return VINF_SUCCESS;
     
    11771177    } while (0)
    11781178# else
    1179 #  define IEM_OPCODE_GET_NEXT_S32_SX_U64(a_pu64) (*(a_pu64) = (int32_t)iemOpcodeGetNextU32Jmp(pVCpu))
     1179#  define IEM_OPCODE_GET_NEXT_S32_SX_U64(a_pu64) (*(a_pu64) = (uint64_t)(int64_t)(int32_t)iemOpcodeGetNextU32Jmp(pVCpu))
    11801180# endif
    11811181
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