Changeset 105172 in vbox
- Timestamp:
- Jul 7, 2024 12:59:59 PM (8 months ago)
- svn:sync-xref-src-repo-rev:
- 163814
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/armv8.h
r105171 r105172 4820 4820 } ARMV8INSTRVECARITHSZ; 4821 4821 4822 /** 4823 * A64: Encodes ADD/SUB (vector, register). 4824 * 4825 * @returns The encoded instruction. 4826 * @param fSub Flag whther this is an addition (false) or subtraction (true) instruction. 4822 4823 /** Armv8 vector arithmetic operation. */ 4824 typedef enum 4825 { 4826 kArmv8VecInstrArithOp_Add = RT_BIT_32(15), /**< ADD */ 4827 kArmv8VecInstrArithOp_Sub = RT_BIT_32(29) | RT_BIT_32(15), /**< SUB */ 4828 kArmv8VecInstrArithOp_UnsignSat_Add = RT_BIT_32(29) | RT_BIT_32(11), /**< UQADD */ 4829 kArmv8VecInstrArithOp_UnsignSat_Sub = RT_BIT_32(29) | RT_BIT_32(13) | RT_BIT_32(11), /**< UQSUB */ 4830 kArmv8VecInstrArithOp_SignSat_Add = RT_BIT_32(11), /**< SQADD */ 4831 kArmv8VecInstrArithOp_SignSat_Sub = RT_BIT_32(13) | RT_BIT_32(11), /**< SQSUB */ 4832 kArmv8VecInstrArithOp_Mul = RT_BIT_32(15) | RT_BIT_32(12) | RT_BIT_32(11) /**< MUL */ 4833 } ARMV8INSTRVECARITHOP; 4834 4835 4836 /** 4837 * A64: Encodes an arithmetic operation (vector, register). 4838 * 4839 * @returns The encoded instruction. 4840 * @param enmOp The operation to encode. 4827 4841 * @param iVecRegDst The vector register to put the result into. 4828 4842 * @param iVecRegSrc1 The first vector source register. … … 4832 4846 * or just the low 64-bit (false). 4833 4847 */ 4834 DECL_FORCE_INLINE(uint32_t) Armv8A64MkVecInstrA ddSub(bool fSub, uint32_t iVecRegDst, uint32_t iVecRegSrc1, uint32_t iVecRegSrc2,4835 ARMV8INSTRVECARITHSZ enmSz, bool f128Bit = true)4848 DECL_FORCE_INLINE(uint32_t) Armv8A64MkVecInstrArithOp(ARMV8INSTRVECARITHOP enmOp, uint32_t iVecRegDst, uint32_t iVecRegSrc1, uint32_t iVecRegSrc2, 4849 ARMV8INSTRVECARITHSZ enmSz, bool f128Bit = true) 4836 4850 { 4837 4851 Assert(iVecRegDst < 32); Assert(iVecRegSrc1 < 32); Assert(iVecRegSrc2 < 32); 4838 4852 4839 return UINT32_C(0x0e208400) 4853 return UINT32_C(0x0e200400) 4854 | (uint32_t)enmOp 4840 4855 | ((uint32_t)f128Bit << 30) 4841 | ((uint32_t)fSub << 29)4842 4856 | ((uint32_t)enmSz << 22) 4843 4857 | (iVecRegSrc2 << 16) -
trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h
r105170 r105172 12925 12925 { 12926 12926 IEMOP_MNEMONIC2(RM, PMULLW, pmullw, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 12927 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_pmullw_u128);12927 SSE2_OPT_BODY_FullFull_To_Full(pmullw, iemAImpl_pmullw_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 12928 12928 } 12929 12929 … … 13238 13238 { 13239 13239 IEMOP_MNEMONIC2(RM, PADDUSB, paddusb, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 13240 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_paddusb_u128);13240 SSE2_OPT_BODY_FullFull_To_Full(paddusb, iemAImpl_paddusb_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 13241 13241 } 13242 13242 … … 13257 13257 { 13258 13258 IEMOP_MNEMONIC2(RM, PADDUSW, paddusw, Vx, Wx, DISOPTYPE_HARMLESS | DISOPTYPE_X86_SSE, IEMOPHINT_IGNORES_OP_SIZES); 13259 return FNIEMOP_CALL_1(iemOpCommonSse2Opt_FullFull_To_Full, iemAImpl_paddusw_u128);13259 SSE2_OPT_BODY_FullFull_To_Full(paddusw, iemAImpl_paddusw_u128, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64, RT_ARCH_VAL_AMD64 | RT_ARCH_VAL_ARM64); 13260 13260 } 13261 13261 -
trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h
r105170 r105172 2084 2084 2085 2085 /** 2086 * Common emitter for the paddX/psubXinstructions.2087 */ 2088 #ifdef RT_ARCH_AMD64 2089 # define IEMNATIVE_NATIVE_EMIT_A DD_SUB_U128(a_Instr, a_fSub, a_ArmElemSz, a_bOpcX86) \2086 * Common emitter for packed arithmetic instructions. 2087 */ 2088 #ifdef RT_ARCH_AMD64 2089 # define IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(a_Instr, a_enmArmOp, a_ArmElemSz, a_bOpcX86) \ 2090 2090 DECL_INLINE_THROW(uint32_t) \ 2091 2091 RT_CONCAT3(iemNativeEmit_,a_Instr,_rr_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ … … 2131 2131 typedef int ignore_semicolon 2132 2132 #elif defined(RT_ARCH_ARM64) 2133 # define IEMNATIVE_NATIVE_EMIT_A DD_SUB_U128(a_Instr, a_fSub, a_ArmElemSz, a_bOpcX86) \2133 # define IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(a_Instr, a_enmArmOp, a_ArmElemSz, a_bOpcX86) \ 2134 2134 DECL_INLINE_THROW(uint32_t) \ 2135 2135 RT_CONCAT3(iemNativeEmit_,a_Instr,_rr_u128)(PIEMRECOMPILERSTATE pReNative, uint32_t off, \ … … 2141 2141 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); \ 2142 2142 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \ 2143 pCodeBuf[off++] = Armv8A64MkVecInstrA ddSub((a_fSub), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \2143 pCodeBuf[off++] = Armv8A64MkVecInstrArithOp((a_enmArmOp), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \ 2144 2144 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2145 2145 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegSrc); \ … … 2155 2155 uint8_t const idxSimdRegSrc = iemNativeVarSimdRegisterAcquire(pReNative, idxVarSrc, &off, true /*fInitialized*/); \ 2156 2156 PIEMNATIVEINSTR const pCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1); \ 2157 pCodeBuf[off++] = Armv8A64MkVecInstrA ddSub((a_fSub), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \2157 pCodeBuf[off++] = Armv8A64MkVecInstrArithOp((a_enmArmOp), idxSimdRegDst, idxSimdRegDst, idxSimdRegSrc, (a_ArmElemSz)); \ 2158 2158 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); \ 2159 2159 iemNativeVarRegisterRelease(pReNative, idxVarSrc); \ … … 2166 2166 #endif 2167 2167 2168 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddb, false /*a_fSub*/, kArmv8VecInstrArithSz_8, 0xfc); 2169 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddw, false /*a_fSub*/, kArmv8VecInstrArithSz_16, 0xfd); 2170 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddd, false /*a_fSub*/, kArmv8VecInstrArithSz_32, 0xfe); 2171 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(paddq, false /*a_fSub*/, kArmv8VecInstrArithSz_64, 0xd4); 2172 2173 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubb, true /*a_fSub*/, kArmv8VecInstrArithSz_8, 0xf8); 2174 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubw, true /*a_fSub*/, kArmv8VecInstrArithSz_16, 0xf9); 2175 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubd, true /*a_fSub*/, kArmv8VecInstrArithSz_32, 0xfa); 2176 IEMNATIVE_NATIVE_EMIT_ADD_SUB_U128(psubq, true /*a_fSub*/, kArmv8VecInstrArithSz_64, 0xfb); 2168 /* 2169 * PADDx. 2170 */ 2171 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(paddb, kArmv8VecInstrArithOp_Add, kArmv8VecInstrArithSz_8, 0xfc); 2172 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(paddw, kArmv8VecInstrArithOp_Add, kArmv8VecInstrArithSz_16, 0xfd); 2173 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(paddd, kArmv8VecInstrArithOp_Add, kArmv8VecInstrArithSz_32, 0xfe); 2174 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(paddq, kArmv8VecInstrArithOp_Add, kArmv8VecInstrArithSz_64, 0xd4); 2175 2176 /* 2177 * PSUBx. 2178 */ 2179 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(psubb, kArmv8VecInstrArithOp_Sub, kArmv8VecInstrArithSz_8, 0xf8); 2180 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(psubw, kArmv8VecInstrArithOp_Sub, kArmv8VecInstrArithSz_16, 0xf9); 2181 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(psubd, kArmv8VecInstrArithOp_Sub, kArmv8VecInstrArithSz_32, 0xfa); 2182 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(psubq, kArmv8VecInstrArithOp_Sub, kArmv8VecInstrArithSz_64, 0xfb); 2183 2184 /* 2185 * PADDUSx. 2186 */ 2187 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(paddusb, kArmv8VecInstrArithOp_UnsignSat_Add, kArmv8VecInstrArithSz_8, 0xdc); 2188 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(paddusw, kArmv8VecInstrArithOp_UnsignSat_Add, kArmv8VecInstrArithSz_16, 0xdd); 2189 2190 /* 2191 * PMULLx. 2192 */ 2193 IEMNATIVE_NATIVE_EMIT_ARITH_OP_U128(pmullw, kArmv8VecInstrArithOp_Mul, kArmv8VecInstrArithSz_16, 0xd5); 2177 2194 2178 2195
Note:
See TracChangeset
for help on using the changeset viewer.