Lines Matching refs:imm6
284 static inline u16 rv_ci_insn(u8 funct3, u32 imm6, u8 rd, u8 op) in rv_ci_insn() argument
288 imm = ((imm6 & 0x20) << 7) | ((imm6 & 0x1f) << 2); in rv_ci_insn()
322 static inline u16 rv_cb_insn(u8 funct3, u32 imm6, u8 funct2, u8 rd, u8 op) in rv_cb_insn() argument
326 imm = ((imm6 & 0x20) << 7) | ((imm6 & 0x1f) << 2); in rv_cb_insn()
566 static inline u16 rvc_addi(u8 rd, u32 imm6) in rvc_addi() argument
568 return rv_ci_insn(0, imm6, rd, 0x1); in rvc_addi()
571 static inline u16 rvc_li(u8 rd, u32 imm6) in rvc_li() argument
573 return rv_ci_insn(0x2, imm6, rd, 0x1); in rvc_li()
585 static inline u16 rvc_lui(u8 rd, u32 imm6) in rvc_lui() argument
587 return rv_ci_insn(0x3, imm6, rd, 0x1); in rvc_lui()
590 static inline u16 rvc_srli(u8 rd, u32 imm6) in rvc_srli() argument
592 return rv_cb_insn(0x4, imm6, 0, rd, 0x1); in rvc_srli()
595 static inline u16 rvc_srai(u8 rd, u32 imm6) in rvc_srai() argument
597 return rv_cb_insn(0x4, imm6, 0x1, rd, 0x1); in rvc_srai()
600 static inline u16 rvc_andi(u8 rd, u32 imm6) in rvc_andi() argument
602 return rv_cb_insn(0x4, imm6, 0x2, rd, 0x1); in rvc_andi()
625 static inline u16 rvc_slli(u8 rd, u32 imm6) in rvc_slli() argument
627 return rv_ci_insn(0, imm6, rd, 0x2); in rvc_slli()
780 static inline u16 rvc_addiw(u8 rd, u32 imm6) in rvc_addiw() argument
782 return rv_ci_insn(0x1, imm6, rd, 0x1); in rvc_addiw()