• Home
  • Raw
  • Download

Lines Matching refs:Imm

112   static inline unsigned getSORegOpc(ShiftOpc ShOp, unsigned Imm) {  in getSORegOpc()  argument
113 return ShOp | (Imm << 3); in getSORegOpc()
124 static inline unsigned getSOImmValImm(unsigned Imm) { in getSOImmValImm() argument
125 return Imm & 0xFF; in getSOImmValImm()
129 static inline unsigned getSOImmValRot(unsigned Imm) { in getSOImmValRot() argument
130 return (Imm >> 8) * 2; in getSOImmValRot()
137 static inline unsigned getSOImmValRotate(unsigned Imm) { in getSOImmValRotate() argument
140 if ((Imm & ~255U) == 0) return 0; in getSOImmValRotate()
143 unsigned TZ = countTrailingZeros(Imm); in getSOImmValRotate()
150 if ((rotr32(Imm, RotAmt) & ~255U) == 0) in getSOImmValRotate()
155 if (Imm & 63U) { in getSOImmValRotate()
156 unsigned TZ2 = countTrailingZeros(Imm & ~63U); in getSOImmValRotate()
158 if ((rotr32(Imm, RotAmt2) & ~255U) == 0) in getSOImmValRotate()
218 static inline unsigned getThumbImmValShift(unsigned Imm) { in getThumbImmValShift() argument
221 if ((Imm & ~255U) == 0) return 0; in getThumbImmValShift()
224 return countTrailingZeros(Imm); in getThumbImmValShift()
237 static inline unsigned getThumbImm16ValShift(unsigned Imm) { in getThumbImm16ValShift() argument
240 if ((Imm & ~65535U) == 0) return 0; in getThumbImm16ValShift()
243 return countTrailingZeros(Imm); in getThumbImm16ValShift()
271 unsigned u, Vs, Imm; in getT2SOImmValSplatVal() local
279 Imm = Vs & 0xff; in getT2SOImmValSplatVal()
281 u = Imm | (Imm << 16); in getT2SOImmValSplatVal()
285 return (((Vs == V) ? 1 : 2) << 8) | Imm; in getT2SOImmValSplatVal()
289 return (3 << 8) | Imm; in getT2SOImmValSplatVal()
335 static inline bool isT2SOImmTwoPartVal (unsigned Imm) { in isT2SOImmTwoPartVal() argument
336 unsigned V = Imm; in isT2SOImmTwoPartVal()
350 V = Imm; in isT2SOImmTwoPartVal()
362 static inline unsigned getT2SOImmTwoPartFirst(unsigned Imm) { in getT2SOImmTwoPartFirst() argument
363 assert (isT2SOImmTwoPartVal(Imm) && in getT2SOImmTwoPartFirst()
366 unsigned V = rotr32 (~255, getT2SOImmValRotate(Imm)) & Imm; in getT2SOImmTwoPartFirst()
371 if (getT2SOImmValSplatVal(Imm & 0xff00ff00U) != -1) in getT2SOImmTwoPartFirst()
372 return Imm & 0xff00ff00U; in getT2SOImmTwoPartFirst()
375 assert (getT2SOImmValSplatVal(Imm & 0x00ff00ffU) != -1); in getT2SOImmTwoPartFirst()
376 return Imm & 0x00ff00ffU; in getT2SOImmTwoPartFirst()
379 static inline unsigned getT2SOImmTwoPartSecond(unsigned Imm) { in getT2SOImmTwoPartSecond() argument
381 Imm ^= getT2SOImmTwoPartFirst(Imm); in getT2SOImmTwoPartSecond()
383 assert (getT2SOImmVal(Imm) != -1 && in getT2SOImmTwoPartSecond()
385 return Imm; in getT2SOImmTwoPartSecond()
651 static inline float getFPImmFloat(unsigned Imm) { in getFPImmFloat() argument
658 uint8_t Sign = (Imm >> 7) & 0x1; in getFPImmFloat()
659 uint8_t Exp = (Imm >> 4) & 0x7; in getFPImmFloat()
660 uint8_t Mantissa = Imm & 0xf; in getFPImmFloat()
679 static inline int getFP16Imm(const APInt &Imm) { in getFP16Imm() argument
680 uint32_t Sign = Imm.lshr(15).getZExtValue() & 1; in getFP16Imm()
681 int32_t Exp = (Imm.lshr(10).getSExtValue() & 0x1f) - 15; // -14 to 15 in getFP16Imm()
682 int64_t Mantissa = Imm.getZExtValue() & 0x3ff; // 10 bits in getFP16Imm()
705 static inline int getFP32Imm(const APInt &Imm) { in getFP32Imm() argument
706 uint32_t Sign = Imm.lshr(31).getZExtValue() & 1; in getFP32Imm()
707 int32_t Exp = (Imm.lshr(23).getSExtValue() & 0xff) - 127; // -126 to 127 in getFP32Imm()
708 int64_t Mantissa = Imm.getZExtValue() & 0x7fffff; // 23 bits in getFP32Imm()
733 static inline int getFP64Imm(const APInt &Imm) { in getFP64Imm() argument
734 uint64_t Sign = Imm.lshr(63).getZExtValue() & 1; in getFP64Imm()
735 int64_t Exp = (Imm.lshr(52).getSExtValue() & 0x7ff) - 1023; // -1022 to 1023 in getFP64Imm()
736 uint64_t Mantissa = Imm.getZExtValue() & 0xfffffffffffffULL; in getFP64Imm()