Lines Matching refs:imm
605 ImmediateT32::ImmediateT32(uint32_t imm) { in ImmediateT32() argument
607 if ((imm & ~0xff) == 0) { in ImmediateT32()
608 SetEncodingValue(imm); in ImmediateT32()
611 if ((imm >> 16) == (imm & 0xffff)) { in ImmediateT32()
612 if ((imm & 0xff00) == 0) { in ImmediateT32()
614 SetEncodingValue((imm & 0xff) | (0x1 << 8)); in ImmediateT32()
617 if ((imm & 0xff) == 0) { in ImmediateT32()
619 SetEncodingValue(((imm >> 8) & 0xff) | (0x2 << 8)); in ImmediateT32()
622 if (((imm >> 8) & 0xff) == (imm & 0xff)) { in ImmediateT32()
624 SetEncodingValue((imm & 0xff) | (0x3 << 8)); in ImmediateT32()
629 uint32_t imm8 = imm >> (24 - shift); in ImmediateT32()
630 uint32_t overflow = imm << (8 + shift); in ImmediateT32()
645 bool ImmediateT32::IsImmediateT32(uint32_t imm) { in IsImmediateT32() argument
647 if ((imm ^ ror(imm, 8)) == 0) return true; in IsImmediateT32()
650 if ((imm ^ ror(imm, 16)) == 0 && in IsImmediateT32()
651 (((imm & 0xff00) == 0) || ((imm & 0xff) == 0))) in IsImmediateT32()
654 uint32_t lsb = imm & -imm; in IsImmediateT32()
657 return ((imm >> 8) < lsb); in IsImmediateT32()
679 ImmediateA32::ImmediateA32(uint32_t imm) { in ImmediateA32() argument
681 if (imm <= 0xff) { in ImmediateA32()
682 SetEncodingValue(imm); in ImmediateA32()
686 uint32_t imm8 = (imm << rot) | (imm >> (32 - rot)); in ImmediateA32()
695 bool ImmediateA32::IsImmediateA32(uint32_t imm) { in IsImmediateA32() argument
697 if (imm < 256) return true; in IsImmediateA32()
700 if (imm & 0xff000000) imm = ror(imm, 16); in IsImmediateA32()
703 imm = imm | ((imm >> 1) & 0x55555555); in IsImmediateA32()
705 uint32_t lsb = imm & -imm; in IsImmediateA32()
708 return ((imm >> 8) < lsb); in IsImmediateA32()