VirtualBox

Changeset 101261 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Sep 25, 2023 11:57:08 PM (15 months ago)
Author:
vboxsync
Message:

VMM/IEM: Corrected FNIEMNATIVETB so it clearly indicates that exceptions may be thrown (or longjmps made) from the translation block. Accidentally used the wrong macro and clang-1200.0.32.27 optimized the exception catching away in release builds on arm64. bugref:10370

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r101258 r101261  
    777777    Ptr = iemDwarfPutCfaOffset(Ptr, DWREG_AMD64_R15, 7);    /* R15     = [CFA + 7*-8] */
    778778#  elif defined(RT_ARCH_ARM64)
     779#   if 1
    779780    Ptr = iemDwarfPutCfaDefCfa(Ptr, DWREG_ARM64_BP,  16);   /* CFA     = BP + 0x10 - first stack parameter */
    780     //Ptr = iemDwarfPutCfaDefCfa(Ptr, DWREG_ARM64_SP,  IEMNATIVE_FRAME_VAR_SIZE + IEMNATIVE_FRAME_SAVE_REG_SIZE);
     781#   else
     782    Ptr = iemDwarfPutCfaDefCfa(Ptr, DWREG_ARM64_SP,  IEMNATIVE_FRAME_VAR_SIZE + IEMNATIVE_FRAME_SAVE_REG_SIZE);
     783#   endif
    781784    Ptr = iemDwarfPutCfaOffset(Ptr, DWREG_ARM64_LR,   1);   /* Ret PC  = [CFA + 1*-8] */
    782785    Ptr = iemDwarfPutCfaOffset(Ptr, DWREG_ARM64_BP,   2);   /* Ret BP  = [CFA + 2*-8] */
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdRecompiler.cpp

    r101245 r101261  
    22502250    {
    22512251        pVCpu->iem.s.cTbExecNative++;
    2252         typedef IEM_DECL_IMPL_TYPE(int, FNIEMNATIVETB, (PVMCPUCC pVCpu, PIEMTB pTb));
    22532252# ifdef LOG_ENABLED
    22542253        iemThreadedLogCurInstr(pVCpu, "EXn");
    22552254# endif
    2256         VBOXSTRICTRC const rcStrict = ((FNIEMNATIVETB *)pTb->Native.paInstructions)(pVCpu, pTb);
     2255        VBOXSTRICTRC const rcStrict = ((PFNIEMTBNATIVE)pTb->Native.paInstructions)(pVCpu);
    22572256        if (RT_LIKELY(   rcStrict == VINF_SUCCESS
    22582257                      && pVCpu->iem.s.rcPassUp == VINF_SUCCESS /** @todo this isn't great. */))
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r101203 r101261  
    779779typedef IEMTHRDEDCALLENTRY const *PCIEMTHRDEDCALLENTRY;
    780780
     781/** Native IEM TB 'function' typedef.
     782 * This will throw/longjmp on occation.  */
     783typedef int FNIEMTBNATIVE(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
     784/** Pointer to a native IEM TB entry point function.
     785 * This will throw/longjmp on occation.  */
     786typedef FNIEMTBNATIVE *PFNIEMTBNATIVE;
     787
     788
    781789/**
    782790 * Translation block.
     
    836844        struct
    837845        {
    838             /** The native instructions. */
     846            /** The native instructions (PFNIEMTBNATIVE). */
    839847            PIEMNATIVEINSTR     paInstructions;
    840848            /** Number of instructions pointed to by paInstructions. */
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