Changeset 104349 in vbox
- Timestamp:
- Apr 17, 2024 2:41:48 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/armv8.h
r104341 r104349 4722 4722 } 4723 4723 4724 4725 /** Armv8 vector compare operation. */ 4726 typedef enum ARMV8VECINSTRCMPOP 4727 { 4728 /* U insn[15:10] */ 4729 kArmv8VecInstrCmpOp_Gt = UINT32_C(0x3400), /**< Greater than (>) (signed) */ 4730 kArmv8VecInstrCmpOp_Ge = UINT32_C(0x3c00), /**< Greater or equal (>=) (signed) */ 4731 kArmv8VecInstrCmpOp_Hi = RT_BIT_32(29) | UINT32_C(0x3400), /**< Greater than (>) (unsigned) */ 4732 kArmv8VecInstrCmpOp_Hs = RT_BIT_32(29) | UINT32_C(0x3c00), /**< Greater or equal (>=) (unsigned) */ 4733 kArmv8VecInstrCmpOp_Eq = RT_BIT_32(29) | UINT32_C(0x8c00) /**< Equal (==) (unsigned) */ 4734 } ARMV8VECINSTRCMPOP; 4735 4736 /** 4737 * A64: Encodes CMEQ/CMGE/CMGT/CMHI/CMHS (register variant) (vector, register). 4738 * 4739 * @returns The encoded instruction. 4740 * @param enmOp The operation to perform. 4741 * @param iVecRegDst The vector register to put the result into. 4742 * @param iVecRegSrc1 The first vector source register. 4743 * @param iVecRegSrc2 The second vector source register. 4744 * @param enmSz Element size. 4745 * @param f128Bit Flag whether this operates on the full 128-bit (true, default) of the vector register 4746 * or just the low 64-bit (false). 4747 */ 4748 DECL_FORCE_INLINE(uint32_t) Armv8A64MkVecInstrCmp(ARMV8VECINSTRCMPOP enmOp, uint32_t iVecRegDst, uint32_t iVecRegSrc1, uint32_t iVecRegSrc2, 4749 ARMV8INSTRVECARITHSZ enmSz, bool f128Bit = true) 4750 { 4751 Assert(iVecRegDst < 32); Assert(iVecRegSrc1 < 32); Assert(iVecRegSrc2 < 32); 4752 4753 return UINT32_C(0x0e200000) 4754 | ((uint32_t)f128Bit << 30) 4755 | ((uint32_t)enmSz << 22) 4756 | (iVecRegSrc2 << 16) 4757 | ((uint32_t)enmOp) 4758 | (iVecRegSrc1 << 5) 4759 | iVecRegDst; 4760 } 4761 4762 4763 /** Armv8 vector compare against zero operation. */ 4764 typedef enum ARMV8VECINSTRCMPZEROOP 4765 { 4766 /* U insn[15:10] */ 4767 kArmv8VecInstrCmpZeroOp_Gt = UINT32_C(0x8800), /**< Greater than zero (>) (signed) */ 4768 kArmv8VecInstrCmpZeroOp_Eq = UINT32_C(0x9800), /**< Equal to zero (==) */ 4769 kArmv8VecInstrCmpZeroOp_Lt = UINT32_C(0xa800), /**< Lower than zero (>=) (signed) */ 4770 kArmv8VecInstrCmpZeroOp_Ge = RT_BIT_32(29) | UINT32_C(0x8800), /**< Greater or equal to zero (>=) (signed) */ 4771 kArmv8VecInstrCmpZeroOp_Le = RT_BIT_32(29) | UINT32_C(0x9800), /**< Lower or equal to zero (<=) (signed) */ 4772 } ARMV8VECINSTRCMPZEROOP; 4773 4774 /** 4775 * A64: Encodes CMEQ/CMGE/CMGT/CMLE/CMLT (zero variant) (vector, register). 4776 * 4777 * @returns The encoded instruction. 4778 * @param enmOp The operation to perform. 4779 * @param iVecRegDst The vector register to put the result into. 4780 * @param iVecRegSrc The first vector source register. 4781 * @param enmSz Element size. 4782 * @param f128Bit Flag whether this operates on the full 128-bit (true, default) of the vector register 4783 * or just the low 64-bit (false). 4784 */ 4785 DECL_FORCE_INLINE(uint32_t) Armv8A64MkVecInstrCmpAgainstZero(ARMV8VECINSTRCMPOP enmOp, uint32_t iVecRegDst, uint32_t iVecRegSrc, 4786 ARMV8INSTRVECARITHSZ enmSz, bool f128Bit = true) 4787 { 4788 Assert(iVecRegDst < 32); Assert(iVecRegSrc1 < 32); Assert(iVecRegSrc2 < 32); 4789 4790 return UINT32_C(0x0e200000) 4791 | ((uint32_t)f128Bit << 30) 4792 | ((uint32_t)enmSz << 22) 4793 | ((uint32_t)enmOp) 4794 | (iVecRegSrc << 5) 4795 | iVecRegDst; 4796 } 4797 4724 4798 /** @} */ 4725 4799
Note:
See TracChangeset
for help on using the changeset viewer.