Line data Source code
1 : #ifdef __PLUMED_HAS_ASMJIT 2 : // This file is part of AsmJit project <https://asmjit.com> 3 : // 4 : // See asmjit.h or LICENSE.md for license and copyright information 5 : // SPDX-License-Identifier: Zlib 6 : 7 : #ifndef ASMJIT_ARM_A64INSTDB_H_INCLUDED 8 : #define ASMJIT_ARM_A64INSTDB_H_INCLUDED 9 : 10 : #include "a64globals.h" 11 : 12 : ASMJIT_BEGIN_SUB_NAMESPACE(a64) 13 : 14 : //! \addtogroup asmjit_a64 15 : //! \{ 16 : 17 : //! Instruction database (AArch64). 18 : namespace InstDB { 19 : 20 : //! Instruction flags. 21 : enum InstFlags : uint32_t { 22 : //! The instruction provides conditional execution. 23 : kInstFlagCond = 0x00000001u, 24 : //! SIMD instruction that processes elements in pairs. 25 : kInstFlagPair = 0x00000002u, 26 : //! SIMD instruction that does widening (Long). 27 : kInstFlagLong = 0x00000004u, 28 : //! SIMD instruction that does narrowing (Narrow). 29 : kInstFlagNarrow = 0x00000008u, 30 : //! SIMD element access of half-words can only be used with v0..15. 31 : kInstFlagVH0_15 = 0x00000010u, 32 : 33 : //! Instruction may consecutive registers if the number of operands is greater than 2. 34 : kInstFlagConsecutive = 0x00000080u 35 : }; 36 : 37 : //! Instruction information (AArch64). 38 : struct InstInfo { 39 : //! Instruction encoding type. 40 : uint32_t _encoding : 8; 41 : //! Index to data specific to each encoding type. 42 : uint32_t _encodingDataIndex : 8; 43 : uint32_t _reserved : 2; 44 : //! Index to \ref _nameData. 45 : uint32_t _nameDataIndex : 14; 46 : 47 : uint16_t _rwInfoIndex; 48 : uint16_t _flags; 49 : 50 : //! \name Accessors 51 : //! \{ 52 : 53 0 : inline uint32_t rwInfoIndex() const noexcept { return _rwInfoIndex; } 54 0 : inline uint32_t flags() const noexcept { return _flags; } 55 : 56 0 : inline bool hasFlag(uint32_t flag) const { return (_flags & flag) != 0; } 57 : 58 : //! \} 59 : }; 60 : 61 : ASMJIT_VARAPI const InstInfo _instInfoTable[]; 62 : 63 : static inline const InstInfo& infoById(InstId instId) noexcept { 64 : instId &= uint32_t(InstIdParts::kRealId); 65 : ASMJIT_ASSERT(Inst::isDefinedId(instId)); 66 : return _instInfoTable[instId]; 67 : } 68 : 69 : } // {InstDB} 70 : 71 : //! \} 72 : 73 : ASMJIT_END_SUB_NAMESPACE 74 : 75 : #endif // ASMJIT_ARM_A64INSTDB_H_INCLUDED 76 : 77 : #endif // __PLUMED_HAS_ASMJIT