Changeset 104292 in vbox for trunk/include
- Timestamp:
- Apr 11, 2024 10:21:57 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/armv8.h
r104279 r104292 4613 4613 4614 4614 4615 /** Armv8 USHR/USRA/URSRA/SSHR/SRSA/SSHR vector element size. */ 4616 typedef enum ARMV8INSTRUSHIFTSZ 4617 { 4618 kArmv8InstrShiftSz_U8 = 16, /**< Byte. */ 4619 kArmv8InstrShiftSz_U16 = 32, /**< Halfword. */ 4620 kArmv8InstrShiftSz_U32 = 64, /**< 32-bit. */ 4621 kArmv8InstrShiftSz_U64 = 128 /**< 64-bit. */ 4622 } ARMV8INSTRUSHIFTSZ; 4623 4624 /** 4625 * A64: Encodes USHR/USRA/URSRA/SSHR/SRSA/SSHR (vector, register). 4626 * 4627 * @returns The encoded instruction. 4628 * @param iVecRegDst The vector register to put the result into. 4629 * @param iVecRegSrc The vector source register. 4630 * @param enmSz Element size. 4631 * @param fUnsigned Flag whether this a signed or unsigned shift, 4632 * @param fRound Flag whether this is the rounding shift variant. 4633 * @param fAccum Flag whether this is the accumulate shift variant. 4634 * @param f128Bit Flag whether this operates on the full 128-bit (true, default) of the vector register 4635 * or just the low 64-bit (false). 4636 */ 4637 DECL_FORCE_INLINE(uint32_t) Armv8A64MkVecInstrShrImm(uint32_t iVecRegDst, uint32_t iVecRegSrc, uint8_t cShift, ARMV8INSTRUSHIFTSZ enmSz, 4638 bool fUnsigned = true, bool fRound = false, bool fAccum = false, bool f128Bit = true) 4639 { 4640 Assert(iVecRegDst < 32); Assert(iVecRegSrc < 32); 4641 Assert( cShift >= 1 4642 && ( (enmSz == kArmv8InstrShiftSz_U8 && cShift <= 8) 4643 || (enmSz == kArmv8InstrShiftSz_U16 && cShift <= 16) 4644 || (enmSz == kArmv8InstrShiftSz_U32 && cShift <= 32) 4645 || (enmSz == kArmv8InstrShiftSz_U64 && cShift <= 64))); 4646 4647 return UINT32_C(0xf000400) 4648 | ((uint32_t)f128Bit << 30) 4649 | ((uint32_t)fUnsigned << 29) 4650 | (((uint32_t)enmSz - cShift) << 16) 4651 | ((uint32_t)fRound << 13) 4652 | ((uint32_t)fAccum << 12) 4653 | (iVecRegSrc << 5) 4654 | iVecRegDst; 4655 } 4615 4656 /** @} */ 4616 4657
Note:
See TracChangeset
for help on using the changeset viewer.