Changeset 105275 in vbox
- Timestamp:
- Jul 11, 2024 4:56:45 PM (7 months ago)
- svn:sync-xref-src-repo-rev:
- 163927
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r105274 r105275 5969 5969 5970 5970 ;; 5971 ; The pcmpistri instruction. 5971 ; The pcmpistri/vcmpistri instruction. 5972 ; 5973 ; @param 1 The instruction name 5972 5974 ; 5973 5975 ; @return R0_32 The new ECX value. … … 5977 5979 ; @param A3 The 8-bit immediate 5978 5980 ; 5979 BEGINPROC_FASTCALL iemAImpl_pcmpistri_u128, 16 5981 %macro IEMIMPL_MEDIA_V_CMPISTRI 1 5982 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u128, 16 5980 5983 PROLOGUE_4_ARGS 5981 5984 IEMIMPL_SSE_PROLOGUE … … 5996 5999 .imm %+ bImm: 5997 6000 IBT_ENDBRxx_WITHOUT_NOTRACK 5998 pcmpistrixmm0, xmm1, bImm6001 %1 xmm0, xmm1, bImm 5999 6002 ret 6000 6003 int3 … … 6002 6005 %endrep 6003 6006 .immEnd: 6004 ENDPROC iemAImpl_pcmpistri_u128 6007 ENDPROC iemAImpl_ %+ %1 %+ _u128 6008 %endmacro 6009 6010 IEMIMPL_MEDIA_V_CMPISTRI pcmpistri 6011 IEMIMPL_MEDIA_V_CMPISTRI vpcmpistri 6012 6005 6013 6006 6014 ;; 6007 6015 ; The pcmpestri instruction. 6016 ; 6017 ; @param 1 The instruction name 6008 6018 ; 6009 6019 ; @param A0 Pointer to the ECX register to store the result to (output). … … 6045 6055 ENDPROC iemAImpl_pcmpestri_u128 6046 6056 6047 ;; 6048 ; The pcmpistrm instruction template. 6049 ; 6050 ; @param A0 Pointer to the XMM0 register to store the result to (output). 6057 6058 ;; 6059 ; The vpcmpestri instruction. 6060 ; 6061 ; @param 1 The instruction name 6062 ; 6063 ; @param A0 Pointer to the ECX register to store the result to (output). 6051 6064 ; @param A1 Pointer to the EFLAGS register. 6052 6065 ; @param A2 Pointer to the structure containing the source operands (input). 6053 6066 ; @param A3 The 8-bit immediate 6054 6067 ; 6055 BEGINPROC_FASTCALL iemAImpl_ pcmpistrm_u128, 166068 BEGINPROC_FASTCALL iemAImpl_vpcmpestri_u128, 16 6056 6069 PROLOGUE_4_ARGS 6057 6070 IEMIMPL_SSE_PROLOGUE 6058 6071 6059 6072 movzx A3, A3_8 ; must clear top bits 6060 movdqu xmm1, [A2 + IEMPCMPISTRXSRC.uSrc1] 6061 movdqu xmm2, [A2 + IEMPCMPISTRXSRC.uSrc2] 6062 IEMIMPL_CALL_JUMP_TABLE_TARGET T1, A3, 8 6063 6073 movdqu xmm0, [A2 + IEMPCMPESTRXSRC.uSrc1] 6074 movdqu xmm1, [A2 + IEMPCMPESTRXSRC.uSrc2] 6075 mov T2, A0 ; A0 can be ecx/rcx in some calling conventions which gets overwritten later (T2 only available on AMD64) 6076 IEMIMPL_JUMP_TABLE_TARGET T1, A3, 8 6077 push xDX ; xDX can be A1 or A2 depending on the calling convention 6078 mov xAX, [A2 + IEMPCMPESTRXSRC.u64Rax] ; T0 is rax, so only overwrite it after we're done using it 6079 mov xDX, [A2 + IEMPCMPESTRXSRC.u64Rdx] 6080 IBT_NOTRACK 6081 call T1 6082 6083 pop xDX 6064 6084 IEM_SAVE_FLAGS_OLD A1, X86_EFL_CF | X86_EFL_ZF | X86_EFL_SF | X86_EFL_OF, 0, X86_EFL_AF | X86_EFL_PF 6065 mov dqu [A0], xmm06085 mov [T2], ecx 6066 6086 6067 6087 IEMIMPL_SSE_EPILOGUE … … 6071 6091 .imm %+ bImm: 6072 6092 IBT_ENDBRxx_WITHOUT_NOTRACK 6073 pcmpistrm xmm1, xmm2, bImm6093 db 0xc4, 0xe3, 0xf9, 0x61, 0xc1, bImm ; vpcmpestri xmm0,xmm1,0x1 with VEX.W set 6074 6094 ret 6075 6095 int3 … … 6077 6097 %endrep 6078 6098 .immEnd: 6079 ENDPROC iemAImpl_pcmpistrm_u128 6080 6081 ;; 6082 ; The pcmpestrm instruction template. 6099 ENDPROC iemAImpl_vpcmpestri_u128 6100 6101 6102 ;; 6103 ; The pcmpistrm/vpcmpistrm instruction template. 6104 ; 6105 ; @param 1 The instruction name 6106 ; 6107 ; @param A0 Pointer to the XMM0 register to store the result to (output). 6108 ; @param A1 Pointer to the EFLAGS register. 6109 ; @param A2 Pointer to the structure containing the source operands (input). 6110 ; @param A3 The 8-bit immediate 6111 ; 6112 %macro IEMIMPL_MEDIA_V_CMPISTRM 1 6113 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u128, 16 6114 PROLOGUE_4_ARGS 6115 IEMIMPL_SSE_PROLOGUE 6116 6117 movzx A3, A3_8 ; must clear top bits 6118 movdqu xmm1, [A2 + IEMPCMPISTRXSRC.uSrc1] 6119 movdqu xmm2, [A2 + IEMPCMPISTRXSRC.uSrc2] 6120 IEMIMPL_CALL_JUMP_TABLE_TARGET T1, A3, 8 6121 6122 IEM_SAVE_FLAGS_OLD A1, X86_EFL_CF | X86_EFL_ZF | X86_EFL_SF | X86_EFL_OF, 0, X86_EFL_AF | X86_EFL_PF 6123 movdqu [A0], xmm0 6124 6125 IEMIMPL_SSE_EPILOGUE 6126 EPILOGUE_4_ARGS 6127 %assign bImm 0 6128 %rep 256 6129 .imm %+ bImm: 6130 IBT_ENDBRxx_WITHOUT_NOTRACK 6131 %1 xmm1, xmm2, bImm 6132 ret 6133 int3 6134 %assign bImm bImm + 1 6135 %endrep 6136 .immEnd: 6137 ENDPROC iemAImpl_ %+ %1 %+ _u128 6138 %endmacro 6139 6140 IEMIMPL_MEDIA_V_CMPISTRM pcmpistrm 6141 IEMIMPL_MEDIA_V_CMPISTRM vpcmpistrm 6142 6143 6144 ;; 6145 ; The pcmpestrm instruction. 6083 6146 ; 6084 6147 ; @param A0 Pointer to the XMM0 register to store the result to (output). … … 6121 6184 6122 6185 ;; 6186 ; The vpcmpestrm instruction. 6187 ; 6188 ; @param A0 Pointer to the XMM0 register to store the result to (output). 6189 ; @param A1 Pointer to the EFLAGS register. 6190 ; @param A2 Pointer to the structure containing the source operands (input). 6191 ; @param A3 The 8-bit immediate 6192 ; 6193 BEGINPROC_FASTCALL iemAImpl_vpcmpestrm_u128, 16 6194 PROLOGUE_4_ARGS 6195 IEMIMPL_SSE_PROLOGUE 6196 6197 movzx A3, A3_8 ; must clear top bits 6198 movdqu xmm1, [A2 + IEMPCMPESTRXSRC.uSrc1] 6199 movdqu xmm2, [A2 + IEMPCMPESTRXSRC.uSrc2] 6200 IEMIMPL_JUMP_TABLE_TARGET T1, A3, 8 6201 push xDX ; xDX can be A1 or A2 depending on the calling convention 6202 mov xAX, [A2 + IEMPCMPESTRXSRC.u64Rax] ; T0 is rax, so only overwrite it after we're done using it 6203 mov xDX, [A2 + IEMPCMPESTRXSRC.u64Rdx] 6204 IBT_NOTRACK 6205 call T1 6206 6207 pop xDX 6208 IEM_SAVE_FLAGS_OLD A1, X86_EFL_CF | X86_EFL_ZF | X86_EFL_SF | X86_EFL_OF, 0, X86_EFL_AF | X86_EFL_PF 6209 movdqu [A0], xmm0 6210 6211 IEMIMPL_SSE_EPILOGUE 6212 EPILOGUE_4_ARGS 6213 %assign bImm 0 6214 %rep 256 6215 .imm %+ bImm: 6216 IBT_ENDBRxx_WITHOUT_NOTRACK 6217 db 0xc4, 0xe3, 0xf9, 0x60, 0xca, bImm ; vpcmpestrm xmm1, xmm2, bImm with VEX.W set 6218 ret 6219 int3 6220 %assign bImm bImm + 1 6221 %endrep 6222 .immEnd: 6223 ENDPROC iemAImpl_vpcmpestrm_u128 6224 6225 6226 ;; 6123 6227 ; movmskp{s,d} SSE instruction template 6124 6228 ; -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r105274 r105275 18698 18698 18699 18699 18700 IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vpcmpistri_u128_fallback,(uint32_t *pEFlags, PCRTUINT128U pSrc1, PCRTUINT128U pSrc2, uint8_t bEvil)) 18701 { 18702 return iemAImpl_pcmpistri_u128_fallback(pEFlags, pSrc1, pSrc2, bEvil); 18703 } 18704 18705 18700 18706 /** 18701 18707 * [V]PCMPESTRI … … 18709 18715 uint16_t u16Result = iemAImpl_pcmpxstrx_worker(pEFlags, &pSrc->uSrc1, &pSrc->uSrc2, cLen1, cLen2, bEvil); 18710 18716 *pu32Ecx = iemAImpl_pcmpxstri_set_result_index(u16Result, cElems, bEvil); 18717 } 18718 18719 18720 IEM_DECL_IMPL_DEF(void, iemAImpl_vpcmpestri_u128_fallback,(uint32_t *pu32Ecx, uint32_t *pEFlags, PCIEMPCMPESTRXSRC pSrc, uint8_t bEvil)) 18721 { 18722 iemAImpl_pcmpestri_u128_fallback(pu32Ecx, pEFlags, pSrc, bEvil); 18711 18723 } 18712 18724 … … 18756 18768 18757 18769 18770 IEM_DECL_IMPL_DEF(void, iemAImpl_vpcmpistrm_u128_fallback,(PRTUINT128U puDst, uint32_t *pEFlags, PCIEMPCMPISTRXSRC pSrc, uint8_t bEvil)) 18771 { 18772 iemAImpl_pcmpistrm_u128_fallback(puDst, pEFlags, pSrc, bEvil); 18773 } 18774 18775 18758 18776 /** 18759 18777 * [V]PCMPESTRM … … 18767 18785 uint16_t u16Result = iemAImpl_pcmpxstrx_worker(pEFlags, &pSrc->uSrc1, &pSrc->uSrc2, cLen1, cLen2, bEvil); 18768 18786 iemAImpl_pcmpxstrm_set_result_mask(puDst, u16Result, cElems, bEvil); 18787 } 18788 18789 18790 IEM_DECL_IMPL_DEF(void, iemAImpl_vpcmpestrm_u128_fallback,(PRTUINT128U puDst, uint32_t *pEFlags, PCIEMPCMPESTRXSRC pSrc, uint8_t bEvil)) 18791 { 18792 iemAImpl_pcmpestrm_u128_fallback(puDst, pEFlags, pSrc, bEvil); 18769 18793 } 18770 18794 -
trunk/src/VBox/VMM/include/IEMInternal.h
r105274 r105275 4006 4006 typedef FNIEMAIMPLPCMPESTRMU128IMM8 *PFNIEMAIMPLPCMPESTRMU128IMM8; 4007 4007 4008 FNIEMAIMPLPCMPISTRIU128IMM8 iemAImpl_pcmpistri_u128, iemAImpl_pcmpistri_u128_fallback; 4009 FNIEMAIMPLPCMPESTRIU128IMM8 iemAImpl_pcmpestri_u128, iemAImpl_pcmpestri_u128_fallback; 4010 FNIEMAIMPLPCMPISTRMU128IMM8 iemAImpl_pcmpistrm_u128, iemAImpl_pcmpistrm_u128_fallback; 4011 FNIEMAIMPLPCMPESTRMU128IMM8 iemAImpl_pcmpestrm_u128, iemAImpl_pcmpestrm_u128_fallback; 4008 FNIEMAIMPLPCMPISTRIU128IMM8 iemAImpl_pcmpistri_u128, iemAImpl_pcmpistri_u128_fallback; 4009 FNIEMAIMPLPCMPESTRIU128IMM8 iemAImpl_pcmpestri_u128, iemAImpl_pcmpestri_u128_fallback; 4010 FNIEMAIMPLPCMPISTRMU128IMM8 iemAImpl_pcmpistrm_u128, iemAImpl_pcmpistrm_u128_fallback; 4011 FNIEMAIMPLPCMPESTRMU128IMM8 iemAImpl_pcmpestrm_u128, iemAImpl_pcmpestrm_u128_fallback; 4012 FNIEMAIMPLPCMPISTRIU128IMM8 iemAImpl_vpcmpistri_u128, iemAImpl_vpcmpistri_u128_fallback; 4013 FNIEMAIMPLPCMPESTRIU128IMM8 iemAImpl_vpcmpestri_u128, iemAImpl_vpcmpestri_u128_fallback; 4014 FNIEMAIMPLPCMPISTRMU128IMM8 iemAImpl_vpcmpistrm_u128, iemAImpl_vpcmpistrm_u128_fallback; 4015 FNIEMAIMPLPCMPESTRMU128IMM8 iemAImpl_vpcmpestrm_u128, iemAImpl_vpcmpestrm_u128_fallback; 4016 4012 4017 4013 4018 FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_pclmulqdq_u128, iemAImpl_pclmulqdq_u128_fallback; -
trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp
r105274 r105275 9461 9461 { 9462 9462 ENTRY_BIN_SSE_OPT(pcmpistri_u128), 9463 ENTRY_BIN_SSE_OPT(vpcmpistri_u128), 9463 9464 }; 9464 9465 … … 9563 9564 { 9564 9565 ENTRY_BIN_SSE_OPT(pcmpistrm_u128), 9566 ENTRY_BIN_SSE_OPT(vpcmpistrm_u128), 9565 9567 }; 9566 9568 … … 9680 9682 { 9681 9683 ENTRY_BIN_SSE_OPT(pcmpestri_u128), 9684 ENTRY_BIN_SSE_OPT(vpcmpestri_u128), 9682 9685 }; 9683 9686 … … 9808 9811 { 9809 9812 ENTRY_BIN_SSE_OPT(pcmpestrm_u128), 9813 ENTRY_BIN_SSE_OPT(vpcmpestrm_u128), 9810 9814 }; 9811 9815 -
trunk/src/VBox/VMM/testcase/tstIEMAImpl.h
r105274 r105275 1027 1027 1028 1028 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPISTRI_TEST_T, pcmpistri_u128 ); 1029 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPISTRI_TEST_T, vpcmpistri_u128 ); 1029 1030 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPESTRI_TEST_T, pcmpestri_u128 ); 1031 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPESTRI_TEST_T, vpcmpestri_u128 ); 1030 1032 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPISTRM_TEST_T, pcmpistrm_u128 ); 1033 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPISTRM_TEST_T, vpcmpistrm_u128 ); 1031 1034 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPESTRM_TEST_T, pcmpestrm_u128 ); 1035 TSTIEM_DECLARE_TEST_ARRAY_BIN(SsePcmpxstrx, SSE_PCMPESTRM_TEST_T, vpcmpestrm_u128 ); 1032 1036 1033 1037 RT_C_DECLS_END -
trunk/src/VBox/VMM/testcase/tstIEMAImplDataSseBinary.S
r104521 r105275 156 156 IEM_TEST_DATA pcmpestri_u128, "tstIEMAImplDataSsePcmpxstrx-pcmpestri_u128.bin.gz" 157 157 IEM_TEST_DATA pcmpestrm_u128, "tstIEMAImplDataSsePcmpxstrx-pcmpestrm_u128.bin.gz" 158 159 IEM_TEST_DATA vpcmpistri_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpistri_u128.bin.gz" 160 IEM_TEST_DATA vpcmpistrm_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpistrm_u128.bin.gz" 161 IEM_TEST_DATA vpcmpestri_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpestri_u128.bin.gz" 162 IEM_TEST_DATA vpcmpestrm_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpestrm_u128.bin.gz" 158 163 159 164 -
trunk/src/VBox/VMM/testcase/tstIEMAImplDataSseBinary.asm
r104521 r105275 155 155 IEM_TEST_DATA pcmpestri_u128, "tstIEMAImplDataSsePcmpxstrx-pcmpestri_u128.bin.gz" 156 156 IEM_TEST_DATA pcmpestrm_u128, "tstIEMAImplDataSsePcmpxstrx-pcmpestrm_u128.bin.gz" 157 158 IEM_TEST_DATA vpcmpistri_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpistri_u128.bin.gz" 159 IEM_TEST_DATA vpcmpistrm_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpistrm_u128.bin.gz" 160 IEM_TEST_DATA vpcmpestri_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpestri_u128.bin.gz" 161 IEM_TEST_DATA vpcmpestrm_u128, "tstIEMAImplDataSsePcmpxstrx-vpcmpestrm_u128.bin.gz" 162 157 163 158 164 ;
Note:
See TracChangeset
for help on using the changeset viewer.