Changeset 104988 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 20, 2024 8:42:07 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInline.h
r104984 r104988 4199 4199 DECLINLINE(bool) iemMemAreAlignmentChecksEnabled(PVMCPUCC pVCpu) RT_NOEXCEPT 4200 4200 { 4201 #if 0 4201 4202 AssertCompile(X86_CR0_AM == X86_EFL_AC); 4202 4203 return IEM_GET_CPL(pVCpu) == 3 4203 4204 && (((uint32_t)pVCpu->cpum.GstCtx.cr0 & pVCpu->cpum.GstCtx.eflags.u) & X86_CR0_AM); 4205 #else 4206 return RT_BOOL(pVCpu->iem.s.fExec & IEM_F_X86_AC); 4207 #endif 4204 4208 } 4205 4209 … … 4562 4566 * trigger an \#AC. 4563 4567 * 4564 * This can be used to deal with misaligned accesses on platforms that are4568 * This can also be used to deal with misaligned accesses on platforms that are 4565 4569 * senstive to such if desires. 4566 4570 */ 4567 AssertCompile(X86_CR0_AM == X86_EFL_AC);4568 AssertCompile(((3U + 1U) << 16) == X86_CR0_AM);4569 4571 #if 1 4570 4572 # define TMPL_MEM_CHECK_UNALIGNED_WITHIN_PAGE_OK(a_pVCpu, a_GCPtrEff, a_TmplMemType) \ 4571 4573 ( ((a_GCPtrEff) & GUEST_PAGE_OFFSET_MASK) <= GUEST_PAGE_SIZE - sizeof(a_TmplMemType) \ 4572 && !( (uint32_t)(a_pVCpu)->cpum.GstCtx.cr0 \ 4573 & (a_pVCpu)->cpum.GstCtx.eflags.u \ 4574 & ((IEM_GET_CPL((a_pVCpu)) + 1U) << 16) /* IEM_GET_CPL(a_pVCpu) == 3 ? X86_CR0_AM : 0 */ \ 4575 & X86_CR0_AM) ) 4574 && !((a_pVCpu)->iem.s.fExec & IEM_F_X86_AC) ) 4576 4575 #else 4577 4576 # define TMPL_MEM_CHECK_UNALIGNED_WITHIN_PAGE_OK(a_pVCpu, a_GCPtrEff, a_TmplMemType) 0
Note:
See TracChangeset
for help on using the changeset viewer.