Lines Matching refs:insn16

116   static uint32_t Decode16CMOffsetW(uint32_t insn16) {  in Decode16CMOffsetW()  argument
117 DCHECK(IsUint<16>(insn16)); in Decode16CMOffsetW()
118 return BitFieldExtract(insn16, 5, 1) << 6 | BitFieldExtract(insn16, 10, 3) << 3 | in Decode16CMOffsetW()
119 BitFieldExtract(insn16, 6, 1) << 2; in Decode16CMOffsetW()
124 static uint32_t Decode16CMOffsetD(uint32_t insn16) { in Decode16CMOffsetD() argument
125 DCHECK(IsUint<16>(insn16)); in Decode16CMOffsetD()
126 return BitFieldExtract(insn16, 5, 2) << 6 | BitFieldExtract(insn16, 10, 3) << 3; in Decode16CMOffsetD()
168 static T Decode16Imm6(uint32_t insn16) { in Decode16Imm6() argument
169 DCHECK(IsUint<16>(insn16)); in Decode16Imm6()
172 BitFieldInsert(BitFieldExtract(insn16, 2, 5), BitFieldExtract(insn16, 12, 1), 5, 1); in Decode16Imm6()
190 static uint32_t GetRs1Short16(uint32_t insn16) { return BitFieldExtract(insn16, 7, 3) + 8u; } in GetRs1Short16() argument
191 static uint32_t GetRs2Short16(uint32_t insn16) { return BitFieldExtract(insn16, 2, 3) + 8u; } in GetRs2Short16() argument
192 static uint32_t GetRs1_16(uint32_t insn16) { return BitFieldExtract(insn16, 7, 5); } in GetRs1_16() argument
193 static uint32_t GetRs2_16(uint32_t insn16) { return BitFieldExtract(insn16, 2, 5); } in GetRs2_16() argument
1637 uint32_t insn16 = static_cast<uint32_t>(insn[0]) + (static_cast<uint32_t>(insn[1]) << 8); in Dump16() local
1639 CHECK_NE(insn16 & 3u, 3u); in Dump16()
1640 os_ << disassembler_->FormatInstructionPointer(insn) << StringPrintf(": %04x \t", insn16); in Dump16()
1642 uint32_t funct3 = BitFieldExtract(insn16, 13, 3); in Dump16()
1645 switch (insn16 & 3u) { in Dump16()
1649 if (insn16 == 0u) { in Dump16()
1652 uint32_t nzuimm = BitFieldExtract(insn16, 5, 8); in Dump16()
1657 os_ << "c.addi4spn " << XRegName(GetRs2Short16(insn16)) << ", sp, " << decoded; in Dump16()
1664 offset = Decode16CMOffsetD(insn16); in Dump16()
1665 os_ << "c.fld " << FRegName(GetRs2Short16(insn16)); in Dump16()
1668 offset = Decode16CMOffsetW(insn16); in Dump16()
1669 os_ << "c.lw " << XRegName(GetRs2Short16(insn16)); in Dump16()
1672 offset = Decode16CMOffsetD(insn16); in Dump16()
1673 os_ << "c.ld " << XRegName(GetRs2Short16(insn16)); in Dump16()
1676 uint32_t opcode2 = BitFieldExtract(insn16, 10, 3); in Dump16()
1677 uint32_t imm = BitFieldExtract(insn16, 5, 2); in Dump16()
1681 os_ << "c.lbu " << XRegName(GetRs2Short16(insn16)); in Dump16()
1686 os_ << XRegName(GetRs2Short16(insn16)); in Dump16()
1690 os_ << "c.sb " << XRegName(GetRs2Short16(insn16)); in Dump16()
1695 os_ << "c.sh " << XRegName(GetRs2Short16(insn16)); in Dump16()
1706 offset = Decode16CMOffsetD(insn16); in Dump16()
1707 os_ << "c.fsd " << FRegName(GetRs2Short16(insn16)); in Dump16()
1710 offset = Decode16CMOffsetW(insn16); in Dump16()
1711 os_ << "c.sw " << XRegName(GetRs2Short16(insn16)); in Dump16()
1714 offset = Decode16CMOffsetD(insn16); in Dump16()
1715 os_ << "c.sd " << XRegName(GetRs2Short16(insn16)); in Dump16()
1722 PrintLoadStoreAddress(GetRs1Short16(insn16), offset); in Dump16()
1727 uint32_t rd = GetRs1_16(insn16); in Dump16()
1729 if (Decode16Imm6<uint32_t>(insn16) != 0u) { in Dump16()
1735 int32_t imm = Decode16Imm6<int32_t>(insn16); in Dump16()
1745 uint32_t rd = GetRs1_16(insn16); in Dump16()
1747 os_ << "c.addiw " << XRegName(rd) << ", " << Decode16Imm6<int32_t>(insn16); in Dump16()
1754 uint32_t rd = GetRs1_16(insn16); in Dump16()
1756 os_ << "c.li " << XRegName(rd) << ", " << Decode16Imm6<int32_t>(insn16); in Dump16()
1763 uint32_t rd = GetRs1_16(insn16); in Dump16()
1764 uint32_t imm6_bits = Decode16Imm6<uint32_t>(insn16); in Dump16()
1768 BitFieldExtract(insn16, 6, 1) << 4 | BitFieldExtract(insn16, 2, 1) << 5 | in Dump16()
1769 BitFieldExtract(insn16, 5, 1) << 6 | BitFieldExtract(insn16, 3, 2) << 7 | in Dump16()
1770 BitFieldExtract(insn16, 12, 1) << 9; in Dump16()
1785 uint32_t funct2 = BitFieldExtract(insn16, 10, 2); in Dump16()
1788 int32_t nzuimm = Decode16Imm6<uint32_t>(insn16); in Dump16()
1790 os_ << "c.srli " << XRegName(GetRs1Short16(insn16)) << ", " << nzuimm; in Dump16()
1797 int32_t nzuimm = Decode16Imm6<uint32_t>(insn16); in Dump16()
1799 os_ << "c.srai " << XRegName(GetRs1Short16(insn16)) << ", " << nzuimm; in Dump16()
1806 os_ << "c.andi " << XRegName(GetRs1Short16(insn16)) << ", " in Dump16()
1807 << Decode16Imm6<int32_t>(insn16); in Dump16()
1814 BitFieldExtract(insn16, 5, 2), BitFieldExtract(insn16, 12, 1), 2, 1); in Dump16()
1818 os_ << mnem << " " << XRegName(GetRs1Short16(insn16)) << ", " in Dump16()
1819 << XRegName(GetRs2Short16(insn16)); in Dump16()
1825 mnem = zbc_mnemonics[BitFieldExtract(insn16, 2, 3)]; in Dump16()
1827 os_ << mnem << " " << XRegName(GetRs1Short16(insn16)); in Dump16()
1841 int32_t disp = BitFieldExtract(insn16, 3, 3) << 1 | BitFieldExtract(insn16, 11, 1) << 4 | in Dump16()
1842 BitFieldExtract(insn16, 2, 1) << 5 | BitFieldExtract(insn16, 7, 1) << 6 | in Dump16()
1843 BitFieldExtract(insn16, 6, 1) << 7 | BitFieldExtract(insn16, 9, 2) << 8 | in Dump16()
1844 BitFieldExtract(insn16, 8, 1) << 10 | BitFieldExtract(insn16, 12, 1) << 11; in Dump16()
1851 int32_t disp = BitFieldExtract(insn16, 3, 2) << 1 | BitFieldExtract(insn16, 10, 2) << 3 | in Dump16()
1852 BitFieldExtract(insn16, 2, 1) << 5 | BitFieldExtract(insn16, 5, 2) << 6 | in Dump16()
1853 BitFieldExtract(insn16, 12, 1) << 8; in Dump16()
1856 os_ << XRegName(GetRs1Short16(insn16)) << ", "; in Dump16()
1868 uint32_t nzuimm = Decode16Imm6<uint32_t>(insn16); in Dump16()
1869 uint32_t rd = GetRs1_16(insn16); in Dump16()
1878 offset = Uimm6ToOffsetD16(Decode16Imm6<uint32_t>(insn16)); in Dump16()
1879 os_ << "c.fldsp " << FRegName(GetRs1_16(insn16)); in Dump16()
1883 uint32_t rd = GetRs1_16(insn16); in Dump16()
1885 offset = Uimm6ToOffsetW16(Decode16Imm6<uint32_t>(insn16)); in Dump16()
1886 os_ << "c.lwsp " << XRegName(GetRs1_16(insn16)); in Dump16()
1894 uint32_t rd = GetRs1_16(insn16); in Dump16()
1896 offset = Uimm6ToOffsetD16(Decode16Imm6<uint32_t>(insn16)); in Dump16()
1897 os_ << "c.ldsp " << XRegName(GetRs1_16(insn16)); in Dump16()
1905 uint32_t rd_rs1 = GetRs1_16(insn16); in Dump16()
1906 uint32_t rs2 = GetRs2_16(insn16); in Dump16()
1907 uint32_t b12 = BitFieldExtract(insn16, 12, 1); in Dump16()
1932 offset = BitFieldExtract(insn16, 7, 3) << 6 | BitFieldExtract(insn16, 10, 3) << 3; in Dump16()
1933 os_ << "c.fsdsp " << FRegName(GetRs2_16(insn16)); in Dump16()
1936 offset = BitFieldExtract(insn16, 7, 2) << 6 | BitFieldExtract(insn16, 9, 4) << 2; in Dump16()
1937 os_ << "c.swsp " << XRegName(GetRs2_16(insn16)); in Dump16()
1940 offset = BitFieldExtract(insn16, 7, 3) << 6 | BitFieldExtract(insn16, 10, 3) << 3; in Dump16()
1941 os_ << "c.sdsp " << XRegName(GetRs2_16(insn16)); in Dump16()