Changeset 100709 in vbox
- Timestamp:
- Jul 26, 2023 1:33:34 PM (16 months ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r100607 r100709 1404 1404 mov edx, [r11 + 4] 1405 1405 1406 lockcmpxchg8b [r10]1406 cmpxchg8b [r10] 1407 1407 1408 1408 mov [r11], eax … … 1424 1424 mov edx, [rsi + 4] 1425 1425 1426 lockcmpxchg8b [rdi]1426 cmpxchg8b [rdi] 1427 1427 1428 1428 mov [rsi], eax … … 1451 1451 mov edx, [esi + 4] 1452 1452 1453 lockcmpxchg8b [edi]1453 cmpxchg8b [edi] 1454 1454 1455 1455 mov [esi], eax … … 1466 1466 1467 1467 BEGINPROC_FASTCALL iemAImpl_cmpxchg8b_locked, 16 1468 ; Lazy bird always lock prefixes cmpxchg8b. 1469 jmp NAME_FASTCALL(iemAImpl_cmpxchg8b,16,$@) 1468 %ifdef RT_ARCH_AMD64 1469 %ifdef ASM_CALL64_MSC 1470 push rbx 1471 1472 mov r11, rdx ; pu64EaxEdx (is also T1) 1473 mov r10, rcx ; pu64Dst 1474 1475 mov ebx, [r8] 1476 mov ecx, [r8 + 4] 1477 IEM_MAYBE_LOAD_FLAGS r9, (X86_EFL_ZF), 0 ; clobbers T0 (eax) 1478 mov eax, [r11] 1479 mov edx, [r11 + 4] 1480 1481 lock cmpxchg8b [r10] 1482 1483 mov [r11], eax 1484 mov [r11 + 4], edx 1485 IEM_SAVE_FLAGS r9, (X86_EFL_ZF), 0 ; clobbers T0+T1 (eax, r11) 1486 1487 pop rbx 1488 ret 1489 %else 1490 push rbx 1491 1492 mov r10, rcx ; pEFlags 1493 mov r11, rdx ; pu64EbxEcx (is also T1) 1494 1495 mov ebx, [r11] 1496 mov ecx, [r11 + 4] 1497 IEM_MAYBE_LOAD_FLAGS r10, (X86_EFL_ZF), 0 ; clobbers T0 (eax) 1498 mov eax, [rsi] 1499 mov edx, [rsi + 4] 1500 1501 lock cmpxchg8b [rdi] 1502 1503 mov [rsi], eax 1504 mov [rsi + 4], edx 1505 IEM_SAVE_FLAGS r10, (X86_EFL_ZF), 0 ; clobbers T0+T1 (eax, r11) 1506 1507 pop rbx 1508 ret 1509 1510 %endif 1511 %else 1512 push esi 1513 push edi 1514 push ebx 1515 push ebp 1516 1517 mov edi, ecx ; pu64Dst 1518 mov esi, edx ; pu64EaxEdx 1519 mov ecx, [esp + 16 + 4 + 0] ; pu64EbxEcx 1520 mov ebp, [esp + 16 + 4 + 4] ; pEFlags 1521 1522 mov ebx, [ecx] 1523 mov ecx, [ecx + 4] 1524 IEM_MAYBE_LOAD_FLAGS ebp, (X86_EFL_ZF), 0 ; clobbers T0 (eax) 1525 mov eax, [esi] 1526 mov edx, [esi + 4] 1527 1528 lock cmpxchg8b [edi] 1529 1530 mov [esi], eax 1531 mov [esi + 4], edx 1532 IEM_SAVE_FLAGS ebp, (X86_EFL_ZF), 0 ; clobbers T0+T1 (eax, edi) 1533 1534 pop ebp 1535 pop ebx 1536 pop edi 1537 pop esi 1538 ret 8 1539 %endif 1470 1540 ENDPROC iemAImpl_cmpxchg8b_locked 1471 1541 … … 1500 1570 mov rdx, [r11 + 8] 1501 1571 1502 lockcmpxchg16b [r10]1572 cmpxchg16b [r10] 1503 1573 1504 1574 mov [r11], rax … … 1520 1590 mov rdx, [rsi + 8] 1521 1591 1522 lockcmpxchg16b [rdi]1592 cmpxchg16b [rdi] 1523 1593 1524 1594 mov [rsi], rax … … 1533 1603 1534 1604 BEGINPROC_FASTCALL iemAImpl_cmpxchg16b_locked, 16 1535 ; Lazy bird always lock prefixes cmpxchg16b. 1536 jmp NAME_FASTCALL(iemAImpl_cmpxchg16b,16,$@) 1605 %ifdef ASM_CALL64_MSC 1606 push rbx 1607 1608 mov r11, rdx ; pu64RaxRdx (is also T1) 1609 mov r10, rcx ; pu64Dst 1610 1611 mov rbx, [r8] 1612 mov rcx, [r8 + 8] 1613 IEM_MAYBE_LOAD_FLAGS r9, (X86_EFL_ZF), 0 ; clobbers T0 (eax) 1614 mov rax, [r11] 1615 mov rdx, [r11 + 8] 1616 1617 lock cmpxchg16b [r10] 1618 1619 mov [r11], rax 1620 mov [r11 + 8], rdx 1621 IEM_SAVE_FLAGS r9, (X86_EFL_ZF), 0 ; clobbers T0+T1 (eax, r11) 1622 1623 pop rbx 1624 ret 1625 %else 1626 push rbx 1627 1628 mov r10, rcx ; pEFlags 1629 mov r11, rdx ; pu64RbxRcx (is also T1) 1630 1631 mov rbx, [r11] 1632 mov rcx, [r11 + 8] 1633 IEM_MAYBE_LOAD_FLAGS r10, (X86_EFL_ZF), 0 ; clobbers T0 (eax) 1634 mov rax, [rsi] 1635 mov rdx, [rsi + 8] 1636 1637 lock cmpxchg16b [rdi] 1638 1639 mov [rsi], rax 1640 mov [rsi + 8], rdx 1641 IEM_SAVE_FLAGS r10, (X86_EFL_ZF), 0 ; clobbers T0+T1 (eax, r11) 1642 1643 pop rbx 1644 ret 1645 1646 %endif 1537 1647 ENDPROC iemAImpl_cmpxchg16b_locked 1538 1648 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r100701 r100709 12194 12194 12195 12195 IEM_MC_FETCH_EFLAGS(EFlags); 12196 if (!(pVCpu->iem.s.fPrefixes & IEM_OP_PRF_LOCK)) 12196 if ( !(pVCpu->iem.s.fExec & IEM_F_X86_DISREGARD_LOCK) 12197 && (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_LOCK)) 12198 IEM_MC_CALL_VOID_AIMPL_4(iemAImpl_cmpxchg8b_locked, pu64MemDst, pu64EaxEdx, pu64EbxEcx, pEFlags); 12199 else 12197 12200 IEM_MC_CALL_VOID_AIMPL_4(iemAImpl_cmpxchg8b, pu64MemDst, pu64EaxEdx, pu64EbxEcx, pEFlags); 12198 else12199 IEM_MC_CALL_VOID_AIMPL_4(iemAImpl_cmpxchg8b_locked, pu64MemDst, pu64EaxEdx, pu64EbxEcx, pEFlags);12200 12201 12201 12202 IEM_MC_MEM_COMMIT_AND_UNMAP(pu64MemDst, IEM_ACCESS_DATA_RW); … … 12244 12245 if (IEM_GET_HOST_CPU_FEATURES(pVCpu)->fMovCmpXchg16b) 12245 12246 { 12246 if (!(pVCpu->iem.s.fPrefixes & IEM_OP_PRF_LOCK)) 12247 if ( !(pVCpu->iem.s.fExec & IEM_F_X86_DISREGARD_LOCK) 12248 && (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_LOCK)) 12249 IEM_MC_CALL_VOID_AIMPL_4(iemAImpl_cmpxchg16b_locked, pu128MemDst, pu128RaxRdx, pu128RbxRcx, pEFlags); 12250 else 12247 12251 IEM_MC_CALL_VOID_AIMPL_4(iemAImpl_cmpxchg16b, pu128MemDst, pu128RaxRdx, pu128RbxRcx, pEFlags); 12248 else12249 IEM_MC_CALL_VOID_AIMPL_4(iemAImpl_cmpxchg16b_locked, pu128MemDst, pu128RaxRdx, pu128RbxRcx, pEFlags);12250 12252 } 12251 12253 else
Note:
See TracChangeset
for help on using the changeset viewer.