VirtualBox

Ignore:
Timestamp:
Nov 12, 2023 1:36:45 AM (15 months ago)
Author:
vboxsync
Message:

VMM/IEM: Native translation of IEM_MC_CLEAR_HIGH_GREG_U64. Had to extend IEMAllN8veRecompiler.py to insert IEM_MC_FREE_LOCAL (and IEM_MC_FREE_ARG) into ELSE branches to simplify state consolidation on IEM_MC_ENDIF (had trouble with cmovxx). bugref:10371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r102069 r102070  
    55785578
    55795579
     5580#define IEM_MC_FREE_LOCAL(a_Name)   iemNativeVarFreeLocal(pReNative, a_Name)
     5581
     5582/**
     5583 * This is called by IEM_MC_FREE_LOCAL.
     5584 */
     5585DECLINLINE(void) iemNativeVarFreeLocal(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar)
     5586{
     5587    IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar);
     5588    Assert(pReNative->Core.aVars[idxVar].uArgNo == UINT8_MAX);
     5589    iemNativeVarFreeOneWorker(pReNative, idxVar);
     5590}
     5591
     5592
     5593#define IEM_MC_FREE_ARG(a_Name)     iemNativeVarFreeArg(pReNative, a_Name)
     5594
     5595/**
     5596 * This is called by IEM_MC_FREE_ARG.
     5597 */
     5598DECLINLINE(void) iemNativeVarFreeArg(PIEMRECOMPILERSTATE pReNative, uint8_t idxVar)
     5599{
     5600    IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar);
     5601    Assert(pReNative->Core.aVars[idxVar].uArgNo < RT_ELEMENTS(pReNative->Core.aidxArgVars));
     5602    iemNativeVarFreeOneWorker(pReNative, idxVar);
     5603}
     5604
     5605
     5606
    55805607/*********************************************************************************************************************************
    55815608*   Emitters for IEM_MC_CALL_CIMPL_XXX                                                                                           *
     
    63866413    off = iemNativeEmitTop32BitsClearCheck(pReNative, off, idxVarReg);
    63876414#endif
     6415    return off;
     6416}
     6417
     6418
     6419
     6420#define IEM_MC_CLEAR_HIGH_GREG_U64(a_iGReg) \
     6421    off = iemNativeEmitClearHighGregU64(pReNative, off, a_iGReg)
     6422
     6423/** Emits code for IEM_MC_CLEAR_HIGH_GREG_U64. */
     6424DECL_INLINE_THROW(uint32_t)
     6425iemNativeEmitClearHighGregU64(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iGReg)
     6426{
     6427    Assert(iGReg < 16);
     6428    uint8_t const idxGstTmpReg = iemNativeRegAllocTmpForGuestReg(pReNative, &off, IEMNATIVEGSTREG_GPR(iGReg),
     6429                                                                 kIemNativeGstRegUse_ForUpdate);
     6430    off = iemNativeEmitLoadGprFromGpr32(pReNative, off, idxGstTmpReg, idxGstTmpReg);
     6431    off = iemNativeEmitStoreGprToVCpuU64(pReNative, off, idxGstTmpReg, RT_UOFFSETOF_DYN(VMCPU, cpum.GstCtx.aGRegs[iGReg]));
     6432    iemNativeRegFreeTmp(pReNative, idxGstTmpReg);
    63886433    return off;
    63896434}
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