Changeset 104798 in vbox for trunk/src/VBox
- Timestamp:
- May 28, 2024 7:04:30 AM (6 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veHlpA-arm64.S
r104367 r104798 95 95 br x2 96 96 97 #ifdef IEMNATIVE_WITH_RECOMPILER_EPILOGUE_SINGLETON 98 /** 99 * This is the common epilog for all TBs, restoring all volatile registers 100 * and cleaning up the stack frame. This is a direct jump target and not a 101 * real function to call using bl/blr. 102 */ 103 ALIGNCODE(IEM_HLP_FUNCTION_ALIGNMENT) 104 BEGINPROC_HIDDEN iemNativeTbEpilog 105 ldp x19, x20, [sp, #IEMNATIVE_FRAME_VAR_SIZE]! 106 ldp x21, x22, [sp, #0x10] 107 ldp x23, x24, [sp, #0x20] 108 ldp x25, x26, [sp, #0x30] 109 ldp x27, x28, [sp, #0x40] 110 ldp x29, x30, [sp, #0x50] 111 add sp, sp, #IEMNATIVE_FRAME_SAVE_REG_SIZE 112 # ifdef RT_OS_DARWIN 113 retab 114 # else 115 ret 116 # endif 117 #endif 118 97 119 98 120 /** -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r104797 r104798 6662 6662 IEMNATIVE_STRICT_EFLAGS_SKIPPING_EMIT_CHECK(pReNative, off, X86_EFL_STATUS_BITS); 6663 6663 6664 #ifdef IEMNATIVE_WITH_RECOMPILER_EPILOGUE_SINGLETON 6665 //off = iemNativeEmitBrk(pReNative, off, 0x7777); 6666 off = iemNativeEmitJmpImm(pReNative, off, (uintptr_t)iemNativeTbEpilog); 6667 #else 6664 6668 /* 6665 6669 * Restore registers and return. 6666 6670 */ 6667 # ifdef RT_ARCH_AMD646671 # ifdef RT_ARCH_AMD64 6668 6672 uint8_t * const pbCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 20); 6669 6673 … … 6683 6687 pbCodeBuf[off++] = X86_OP_REX_B; /* pop r12 */ 6684 6688 pbCodeBuf[off++] = 0x58 + X86_GREG_x12 - 8; 6685 # ifdef RT_OS_WINDOWS6689 # ifdef RT_OS_WINDOWS 6686 6690 pbCodeBuf[off++] = 0x58 + X86_GREG_xDI; /* pop rdi */ 6687 6691 pbCodeBuf[off++] = 0x58 + X86_GREG_xSI; /* pop rsi */ 6688 # endif6692 # endif 6689 6693 pbCodeBuf[off++] = 0x58 + X86_GREG_xBX; /* pop rbx */ 6690 6694 pbCodeBuf[off++] = 0xc9; /* leave */ … … 6692 6696 pbCodeBuf[off++] = 0xcc; /* int3 poison */ 6693 6697 6694 # elif RT_ARCH_ARM646698 # elif RT_ARCH_ARM64 6695 6699 uint32_t * const pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 10); 6696 6700 … … 6719 6723 6720 6724 /* retab / ret */ 6721 # ifdef RT_OS_DARWIN /** @todo See todo on pacibsp in the prolog. */6725 # ifdef RT_OS_DARWIN /** @todo See todo on pacibsp in the prolog. */ 6722 6726 if (1) 6723 6727 pu32CodeBuf[off++] = ARMV8_A64_INSTR_RETAB; 6724 6728 else 6729 # endif 6730 pu32CodeBuf[off++] = ARMV8_A64_INSTR_RET; 6731 6732 # else 6733 # error "port me" 6725 6734 # endif 6726 pu32CodeBuf[off++] = ARMV8_A64_INSTR_RET;6727 6728 #else6729 # error "port me"6730 #endif6731 6735 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 6736 #endif /* IEMNATIVE_WITH_RECOMPILER_EPILOGUE_SINGLETON */ 6732 6737 6733 6738 /* HACK: For IEMNATIVE_STRICT_EFLAGS_SKIPPING_EMIT_CHECK. */ -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r104797 r104798 82 82 #endif 83 83 84 /** @def IEMNATIVE_WITH_RECOMPILER_EPILOGUE_SINGLETON 85 * Enables having only a single epilogue for native TBs. */ 86 #if defined(RT_ARCH_ARM64) || defined(DOXYGEN_RUNNING) 87 # define IEMNATIVE_WITH_RECOMPILER_EPILOGUE_SINGLETON 88 #endif 84 89 85 90 /** @name Stack Frame Layout … … 2580 2585 #endif 2581 2586 2587 #ifdef IEMNATIVE_WITH_RECOMPILER_EPILOGUE_SINGLETON 2588 /** The common epilog jumped to from a TB. 2589 * @note This is not a callable function! */ 2590 extern "C" IEM_DECL_NATIVE_HLP_DEF(int, iemNativeTbEpilog, (void)); 2591 #endif 2592 2582 2593 #endif /* !RT_IN_ASSEMBLER - ASM-NOINC-END */ 2583 2594 -
trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h
r104797 r104798 7663 7663 7664 7664 7665 /** 7666 * Emits an indirect jump to an immediate 64-bit address (uses the temporary GPR). 7667 */ 7668 DECL_INLINE_THROW(uint32_t) iemNativeEmitJmpImm(PIEMRECOMPILERSTATE pReNative, uint32_t off, uintptr_t uPfn) 7669 { 7670 off = iemNativeEmitLoadGprImm64(pReNative, off, IEMNATIVE_REG_FIXED_TMP0, uPfn); 7671 return iemNativeEmitJmpViaGpr(pReNative, off, IEMNATIVE_REG_FIXED_TMP0); 7672 } 7673 7674 7665 7675 /********************************************************************************************************************************* 7666 7676 * Calls. *
Note:
See TracChangeset
for help on using the changeset viewer.