Lines Matching refs:RV_X
116 #define RV_X(x, s, n) (((x) >> (s)) & ((1 << (n)) - 1)) macro
117 #define RVC_LW_IMM(x) ((RV_X(x, 6, 1) << 2) | \
118 (RV_X(x, 10, 3) << 3) | \
119 (RV_X(x, 5, 1) << 6))
120 #define RVC_LD_IMM(x) ((RV_X(x, 10, 3) << 3) | \
121 (RV_X(x, 5, 2) << 6))
122 #define RVC_LWSP_IMM(x) ((RV_X(x, 4, 3) << 2) | \
123 (RV_X(x, 12, 1) << 5) | \
124 (RV_X(x, 2, 2) << 6))
125 #define RVC_LDSP_IMM(x) ((RV_X(x, 5, 2) << 3) | \
126 (RV_X(x, 12, 1) << 5) | \
127 (RV_X(x, 2, 3) << 6))
128 #define RVC_SWSP_IMM(x) ((RV_X(x, 9, 4) << 2) | \
129 (RV_X(x, 7, 2) << 6))
130 #define RVC_SDSP_IMM(x) ((RV_X(x, 10, 3) << 3) | \
131 (RV_X(x, 7, 3) << 6))
132 #define RVC_RS1S(insn) (8 + RV_X(insn, SH_RD, 3))
133 #define RVC_RS2S(insn) (8 + RV_X(insn, SH_RS2C, 3))
134 #define RVC_RS2(insn) RV_X(insn, SH_RS2C, 5)