Lines Matching refs:RV_X
108 #define RV_X(x, s, n) (((x) >> (s)) & ((1 << (n)) - 1)) macro
109 #define RVC_LW_IMM(x) ((RV_X(x, 6, 1) << 2) | \
110 (RV_X(x, 10, 3) << 3) | \
111 (RV_X(x, 5, 1) << 6))
112 #define RVC_LD_IMM(x) ((RV_X(x, 10, 3) << 3) | \
113 (RV_X(x, 5, 2) << 6))
114 #define RVC_LWSP_IMM(x) ((RV_X(x, 4, 3) << 2) | \
115 (RV_X(x, 12, 1) << 5) | \
116 (RV_X(x, 2, 2) << 6))
117 #define RVC_LDSP_IMM(x) ((RV_X(x, 5, 2) << 3) | \
118 (RV_X(x, 12, 1) << 5) | \
119 (RV_X(x, 2, 3) << 6))
120 #define RVC_SWSP_IMM(x) ((RV_X(x, 9, 4) << 2) | \
121 (RV_X(x, 7, 2) << 6))
122 #define RVC_SDSP_IMM(x) ((RV_X(x, 10, 3) << 3) | \
123 (RV_X(x, 7, 3) << 6))
124 #define RVC_RS1S(insn) (8 + RV_X(insn, SH_RD, 3))
125 #define RVC_RS2S(insn) (8 + RV_X(insn, SH_RS2C, 3))
126 #define RVC_RS2(insn) RV_X(insn, SH_RS2C, 5)