• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/

Lines Matching refs:Imm

112   inline unsigned getSORegOpc(ShiftOpc ShOp, unsigned Imm) {
113 return ShOp | (Imm << 3);
120 inline unsigned getSOImmValImm(unsigned Imm) { return Imm & 0xFF; }
123 inline unsigned getSOImmValRot(unsigned Imm) { return (Imm >> 8) * 2; }
125 /// getSOImmValRotate - Try to handle Imm with an immediate shifter operand,
129 inline unsigned getSOImmValRotate(unsigned Imm) {
132 if ((Imm & ~255U) == 0) return 0;
135 unsigned TZ = countTrailingZeros(Imm);
142 if ((rotr32(Imm, RotAmt) & ~255U) == 0)
147 if (Imm & 63U) {
148 unsigned TZ2 = countTrailingZeros(Imm & ~63U);
150 if ((rotr32(Imm, RotAmt2) & ~255U) == 0)
208 /// getThumbImmValShift - Try to handle Imm with a 8-bit immediate followed
210 inline unsigned getThumbImmValShift(unsigned Imm) {
213 if ((Imm & ~255U) == 0) return 0;
216 return countTrailingZeros(Imm);
227 /// getThumbImm16ValShift - Try to handle Imm with a 16-bit immediate followed
229 inline unsigned getThumbImm16ValShift(unsigned Imm) {
232 if ((Imm & ~65535U) == 0) return 0;
235 return countTrailingZeros(Imm);
263 unsigned u, Vs, Imm;
271 Imm = Vs & 0xff;
273 u = Imm | (Imm << 16);
277 return (((Vs == V) ? 1 : 2) << 8) | Imm;
281 return (3 << 8) | Imm;
327 inline bool isT2SOImmTwoPartVal(unsigned Imm) {
328 unsigned V = Imm;
342 V = Imm;
354 inline unsigned getT2SOImmTwoPartFirst(unsigned Imm) {
355 assert (isT2SOImmTwoPartVal(Imm) &&
358 unsigned V = rotr32 (~255, getT2SOImmValRotate(Imm)) & Imm;
363 if (getT2SOImmValSplatVal(Imm & 0xff00ff00U) != -1)
364 return Imm & 0xff00ff00U;
367 assert (getT2SOImmValSplatVal(Imm & 0x00ff00ffU) != -1);
368 return Imm & 0x00ff00ffU;
371 inline unsigned getT2SOImmTwoPartSecond(unsigned Imm) {
373 Imm ^= getT2SOImmTwoPartFirst(Imm);
375 assert (getT2SOImmVal(Imm) != -1 &&
377 return Imm;
401 assert(Imm12 < (1 << 12) && "Imm too large!");
630 inline float getFPImmFloat(unsigned Imm) {
633 uint8_t Sign = (Imm >> 7) & 0x1;
634 uint8_t Exp = (Imm >> 4) & 0x7;
635 uint8_t Mantissa = Imm & 0xf;
653 inline int getFP16Imm(const APInt &Imm) {
654 uint32_t Sign = Imm.lshr(15).getZExtValue() & 1;
655 int32_t Exp = (Imm.lshr(10).getSExtValue() & 0x1f) - 15; // -14 to 15
656 int64_t Mantissa = Imm.getZExtValue() & 0x3ff; // 10 bits
679 inline int getFP32Imm(const APInt &Imm) {
680 uint32_t Sign = Imm.lshr(31).getZExtValue() & 1;
681 int32_t Exp = (Imm.lshr(23).getSExtValue() & 0xff) - 127; // -126 to 127
682 int64_t Mantissa = Imm.getZExtValue() & 0x7fffff; // 23 bits
707 inline int getFP64Imm(const APInt &Imm) {
708 uint64_t Sign = Imm.lshr(63).getZExtValue() & 1;
709 int64_t Exp = (Imm.lshr(52).getSExtValue() & 0x7ff) - 1023; // -1022 to 1023
710 uint64_t Mantissa = Imm.getZExtValue() & 0xfffffffffffffULL;