Lines Matching refs:RV_X
89 #define RV_X(x, s, n) (((x) >> (s)) & ((1 << (n)) - 1)) macro
90 #define RVC_LW_IMM(x) ((RV_X(x, 6, 1) << 2) | \
91 (RV_X(x, 10, 3) << 3) | \
92 (RV_X(x, 5, 1) << 6))
93 #define RVC_LD_IMM(x) ((RV_X(x, 10, 3) << 3) | \
94 (RV_X(x, 5, 2) << 6))
95 #define RVC_LWSP_IMM(x) ((RV_X(x, 4, 3) << 2) | \
96 (RV_X(x, 12, 1) << 5) | \
97 (RV_X(x, 2, 2) << 6))
98 #define RVC_LDSP_IMM(x) ((RV_X(x, 5, 2) << 3) | \
99 (RV_X(x, 12, 1) << 5) | \
100 (RV_X(x, 2, 3) << 6))
101 #define RVC_SWSP_IMM(x) ((RV_X(x, 9, 4) << 2) | \
102 (RV_X(x, 7, 2) << 6))
103 #define RVC_SDSP_IMM(x) ((RV_X(x, 10, 3) << 3) | \
104 (RV_X(x, 7, 3) << 6))
105 #define RVC_RS1S(insn) (8 + RV_X(insn, SH_RD, 3))
106 #define RVC_RS2S(insn) (8 + RV_X(insn, SH_RS2C, 3))
107 #define RVC_RS2(insn) RV_X(insn, SH_RS2C, 5)