Changeset 102082 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Nov 13, 2023 12:57:44 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 160193
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h
r102068 r102082 662 662 /* movzx Gv,Eb */ 663 663 uint8_t * const pbCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 4); 664 if ( (iGprDst | iGprSrc)>= 8)664 if (iGprDst >= 8 || iGprSrc >= 8) 665 665 pbCodeBuf[off++] = iGprDst < 8 ? X86_OP_REX_B 666 666 : iGprSrc >= 8 ? X86_OP_REX_R | X86_OP_REX_B 667 667 : X86_OP_REX_R; 668 else if (iGprSrc >= 4) 669 pbCodeBuf[off++] = X86_OP_REX; 668 670 pbCodeBuf[off++] = 0x0f; 669 671 pbCodeBuf[off++] = 0xb6; … … 688 690 } 689 691 690 #if 0 /** @todo */ 692 691 693 /** 692 694 * Emits a gprdst = gprsrc[15:8] load (ah, ch, dh, bh). … … 694 696 */ 695 697 DECL_INLINE_THROW(uint32_t) 696 iemNativeEmitLoadGprFromGpr8 hi(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iGprDst, uint8_t iGprSrc)697 { 698 #ifdef RT_ARCH_AMD64 699 /* movzx Gv,Eb */700 /** @todo */ 701 uint8_t * const pbCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 4);698 iemNativeEmitLoadGprFromGpr8Hi(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iGprDst, uint8_t iGprSrc) 699 { 700 #ifdef RT_ARCH_AMD64 701 uint8_t * const pbCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 8); 702 703 /* movzx Gv,Ew */ 702 704 if ((iGprDst | iGprSrc) >= 8) 703 705 pbCodeBuf[off++] = iGprDst < 8 ? X86_OP_REX_B … … 705 707 : X86_OP_REX_R; 706 708 pbCodeBuf[off++] = 0x0f; 707 pbCodeBuf[off++] = 0xb 6;709 pbCodeBuf[off++] = 0xb7; 708 710 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iGprDst & 7, iGprSrc & 7); 709 711 712 /* shr Ev,8 */ 713 if (iGprDst >= 8) 714 pbCodeBuf[off++] = X86_OP_REX_B; 715 pbCodeBuf[off++] = 0xc1; 716 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 5, iGprDst & 7); 717 pbCodeBuf[off++] = 8; 718 710 719 #elif RT_ARCH_ARM64 711 /* ubfxgprdst, gprsrc, #8, #8 */720 /* bfi gprdst, gprsrc, #8, #8 */ 712 721 uint32_t * const pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); 713 Assert(Armv8A64ConvertImmRImmS2Mask64(0x47, 0) == UINT8_MAX); 714 pu32CodeBuf[off++] = /** @todo ubfx */; 722 pu32CodeBuf[off++] = Armv8A64MkInstrBfi(iGprDst, iGprSrc, 8, 8, false /*f64Bit*/); 715 723 716 724 #else … … 720 728 return off; 721 729 } 722 #endif 730 723 731 724 732 #ifdef RT_ARCH_AMD64
Note:
See TracChangeset
for help on using the changeset viewer.