33 "x0",
"x1",
"x2",
"x3",
"x4",
"x5",
"x6",
"x7",
34 "x8",
"x9",
"x10",
"x11",
"x12",
"x13",
"x14",
"x15",
35 "x16",
"x17",
"x18",
"x19",
"x20",
"x21",
"x22",
"x23",
36 "x24",
"x25",
"x26",
"x27",
"x28",
"x29",
"x30",
"x31"
40 "zero",
"ra",
"sp",
"gp",
"tp",
"t0",
"t1",
"t2",
41 "s0",
"s1",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5",
42 "a6",
"a7",
"s2",
"s3",
"s4",
"s5",
"s6",
"s7",
43 "s8",
"s9",
"s10",
"s11",
"t3",
"t4",
"t5",
"t6"
48 "f0",
"f1",
"f2",
"f3",
"f4",
"f5",
"f6",
"f7",
49 "f8",
"f9",
"f10",
"f11",
"f12",
"f13",
"f14",
"f15",
50 "f16",
"f17",
"f18",
"f19",
"f20",
"f21",
"f22",
"f23",
51 "f24",
"f25",
"f26",
"f27",
"f28",
"f29",
"f30",
"f31"
55 "ft0",
"ft1",
"ft2",
"ft3",
"ft4",
"ft5",
"ft6",
"ft7",
56 "fs0",
"fs1",
"fa0",
"fa1",
"fa2",
"fa3",
"fa4",
"fa5",
57 "fa6",
"fa7",
"fs2",
"fs3",
"fs4",
"fs5",
"fs6",
"fs7",
58 "fs8",
"fs9",
"fs10",
"fs11",
"ft8",
"ft9",
"ft10",
"ft11"
71 #define MASK_RS1 (OP_MASK_RS1 << OP_SH_RS1)
72 #define MASK_RS2 (OP_MASK_RS2 << OP_SH_RS2)
73 #define MASK_RD (OP_MASK_RD << OP_SH_RD)
74 #define MASK_CRS2 (OP_MASK_CRS2 << OP_SH_CRS2)
75 #define MASK_IMM ENCODE_ITYPE_IMM (-1U)
76 #define MASK_RVC_IMM ENCODE_RVC_IMM (-1U)
77 #define MASK_UIMM ENCODE_UTYPE_IMM (-1U)
78 #define MASK_RM (OP_MASK_RM << OP_SH_RM)
79 #define MASK_PRED (OP_MASK_PRED << OP_SH_PRED)
80 #define MASK_SUCC (OP_MASK_SUCC << OP_SH_SUCC)
81 #define MASK_AQ (OP_MASK_AQ << OP_SH_AQ)
82 #define MASK_RL (OP_MASK_RL << OP_SH_RL)
83 #define MASK_AQRL (MASK_AQ | MASK_RL)
87 return ((insn ^
op->match) &
op->mask) == 0;
196 {
"add",
"I",
"d,s,t,0",
MATCH_ADD,
MASK_ADD,
match_opcode, 0 },
442 {
"fadd.s",
"F",
"D,S,T,m",
MATCH_FADD_S,
MASK_FADD_S,
match_opcode, 0 },
444 {
"fsub.s",
"F",
"D,S,T,m",
MATCH_FSUB_S,
MASK_FSUB_S,
match_opcode, 0 },
446 {
"fmul.s",
"F",
"D,S,T,m",
MATCH_FMUL_S,
MASK_FMUL_S,
match_opcode, 0 },
448 {
"fdiv.s",
"F",
"D,S,T,m",
MATCH_FDIV_S,
MASK_FDIV_S,
match_opcode, 0 },
453 {
"fmadd.s",
"F",
"D,S,T,R",
MATCH_FMADD_S |
MASK_RM,
MASK_FMADD_S |
MASK_RM,
match_opcode, 0 },
454 {
"fmadd.s",
"F",
"D,S,T,R,m",
MATCH_FMADD_S,
MASK_FMADD_S,
match_opcode, 0 },
455 {
"fnmadd.s",
"F",
"D,S,T,R",
MATCH_FNMADD_S |
MASK_RM,
MASK_FNMADD_S |
MASK_RM,
match_opcode, 0 },
456 {
"fnmadd.s",
"F",
"D,S,T,R,m",
MATCH_FNMADD_S,
MASK_FNMADD_S,
match_opcode, 0 },
457 {
"fmsub.s",
"F",
"D,S,T,R",
MATCH_FMSUB_S |
MASK_RM,
MASK_FMSUB_S |
MASK_RM,
match_opcode, 0 },
458 {
"fmsub.s",
"F",
"D,S,T,R,m",
MATCH_FMSUB_S,
MASK_FMSUB_S,
match_opcode, 0 },
459 {
"fnmsub.s",
"F",
"D,S,T,R",
MATCH_FNMSUB_S |
MASK_RM,
MASK_FNMSUB_S |
MASK_RM,
match_opcode, 0 },
460 {
"fnmsub.s",
"F",
"D,S,T,R,m",
MATCH_FNMSUB_S,
MASK_FNMSUB_S,
match_opcode, 0 },
500 {
"fadd.d",
"D",
"D,S,T,m",
MATCH_FADD_D,
MASK_FADD_D,
match_opcode, 0 },
502 {
"fsub.d",
"D",
"D,S,T,m",
MATCH_FSUB_D,
MASK_FSUB_D,
match_opcode, 0 },
504 {
"fmul.d",
"D",
"D,S,T,m",
MATCH_FMUL_D,
MASK_FMUL_D,
match_opcode, 0 },
506 {
"fdiv.d",
"D",
"D,S,T,m",
MATCH_FDIV_D,
MASK_FDIV_D,
match_opcode, 0 },
511 {
"fmadd.d",
"D",
"D,S,T,R",
MATCH_FMADD_D |
MASK_RM,
MASK_FMADD_D |
MASK_RM,
match_opcode, 0 },
512 {
"fmadd.d",
"D",
"D,S,T,R,m",
MATCH_FMADD_D,
MASK_FMADD_D,
match_opcode, 0 },
513 {
"fnmadd.d",
"D",
"D,S,T,R",
MATCH_FNMADD_D |
MASK_RM,
MASK_FNMADD_D |
MASK_RM,
match_opcode, 0 },
514 {
"fnmadd.d",
"D",
"D,S,T,R,m",
MATCH_FNMADD_D,
MASK_FNMADD_D,
match_opcode, 0 },
515 {
"fmsub.d",
"D",
"D,S,T,R",
MATCH_FMSUB_D |
MASK_RM,
MASK_FMSUB_D |
MASK_RM,
match_opcode, 0 },
516 {
"fmsub.d",
"D",
"D,S,T,R,m",
MATCH_FMSUB_D,
MASK_FMSUB_D,
match_opcode, 0 },
517 {
"fnmsub.d",
"D",
"D,S,T,R",
MATCH_FNMSUB_D |
MASK_RM,
MASK_FNMSUB_D |
MASK_RM,
match_opcode, 0 },
518 {
"fnmsub.d",
"D",
"D,S,T,R,m",
MATCH_FNMSUB_D,
MASK_FNMSUB_D,
match_opcode, 0 },
557 {
"fadd.q",
"Q",
"D,S,T,m",
MATCH_FADD_Q,
MASK_FADD_Q,
match_opcode, 0 },
559 {
"fsub.q",
"Q",
"D,S,T,m",
MATCH_FSUB_Q,
MASK_FSUB_Q,
match_opcode, 0 },
561 {
"fmul.q",
"Q",
"D,S,T,m",
MATCH_FMUL_Q,
MASK_FMUL_Q,
match_opcode, 0 },
563 {
"fdiv.q",
"Q",
"D,S,T,m",
MATCH_FDIV_Q,
MASK_FDIV_Q,
match_opcode, 0 },
568 {
"fmadd.q",
"Q",
"D,S,T,R",
MATCH_FMADD_Q |
MASK_RM,
MASK_FMADD_Q |
MASK_RM,
match_opcode, 0 },
569 {
"fmadd.q",
"Q",
"D,S,T,R,m",
MATCH_FMADD_Q,
MASK_FMADD_Q,
match_opcode, 0 },
570 {
"fnmadd.q",
"Q",
"D,S,T,R",
MATCH_FNMADD_Q |
MASK_RM,
MASK_FNMADD_Q |
MASK_RM,
match_opcode, 0 },
571 {
"fnmadd.q",
"Q",
"D,S,T,R,m",
MATCH_FNMADD_Q,
MASK_FNMADD_Q,
match_opcode, 0 },
572 {
"fmsub.q",
"Q",
"D,S,T,R",
MATCH_FMSUB_Q |
MASK_RM,
MASK_FMSUB_Q |
MASK_RM,
match_opcode, 0 },
573 {
"fmsub.q",
"Q",
"D,S,T,R,m",
MATCH_FMSUB_Q,
MASK_FMSUB_Q,
match_opcode, 0 },
574 {
"fnmsub.q",
"Q",
"D,S,T,R",
MATCH_FNMSUB_Q |
MASK_RM,
MASK_FNMSUB_Q |
MASK_RM,
match_opcode, 0 },
575 {
"fnmsub.q",
"Q",
"D,S,T,R,m",
MATCH_FNMSUB_Q,
MASK_FNMSUB_Q,
match_opcode, 0 },
679 #define RISCV_NUM_OPCODES \
680 ((sizeof riscv_builtin_opcodes) / (sizeof (riscv_builtin_opcodes[0])))
688 #undef RISCV_NUM_OPCODES
static const char *const riscv_gpr_names_numeric[NGPR]
static int match_never(const struct riscv_opcode *op, insn_t insn)
static const char *const riscv_gpr_names_abi[NGPR]
static int bfd_riscv_num_opcodes
static int match_rd_nonzero(const struct riscv_opcode *op, insn_t insn)
static int match_opcode(const struct riscv_opcode *op, insn_t insn)
#define RISCV_NUM_OPCODES
static int match_c_lui(const struct riscv_opcode *op, insn_t insn)
static const char *const riscv_fpr_names_abi[NFPR]
static struct riscv_opcode * riscv_opcodes
static int match_rs1_eq_rs2(const struct riscv_opcode *op, insn_t insn)
static int match_c_add(const struct riscv_opcode *op, insn_t insn)
static const char *const riscv_fpr_names_numeric[NFPR]
static const struct riscv_opcode riscv_builtin_opcodes[]
#define ENCODE_ITYPE_IMM(x)