Browse Source

Remove insn_func_t::supported field

The field is rendered unnecessary by 11f5942b7d.

Undoes some changes from 750f008e72.
pull/997/head
Andrew Waterman 4 years ago
parent
commit
68b20a9b8a
  1. 6
      customext/cflush.cc
  2. 1
      riscv/processor.cc
  3. 6
      riscv/processor.h
  4. 8
      riscv/rocc.cc

6
customext/cflush.cc

@ -24,9 +24,9 @@ class cflush_t : public extension_t
std::vector<insn_desc_t> get_instructions() {
std::vector<insn_desc_t> insns;
insns.push_back((insn_desc_t){true, 0xFC000073, 0xFFF07FFF, custom_cflush, custom_cflush, custom_cflush, custom_cflush});
insns.push_back((insn_desc_t){true, 0xFC200073, 0xFFF07FFF, custom_cflush, custom_cflush, custom_cflush, custom_cflush});
insns.push_back((insn_desc_t){true, 0xFC100073, 0xFFF07FFF, custom_cflush, custom_cflush, custom_cflush, custom_cflush});
insns.push_back((insn_desc_t){0xFC000073, 0xFFF07FFF, custom_cflush, custom_cflush, custom_cflush, custom_cflush});
insns.push_back((insn_desc_t){0xFC200073, 0xFFF07FFF, custom_cflush, custom_cflush, custom_cflush, custom_cflush});
insns.push_back((insn_desc_t){0xFC100073, 0xFFF07FFF, custom_cflush, custom_cflush, custom_cflush, custom_cflush});
return insns;
}

1
riscv/processor.cc

@ -961,7 +961,6 @@ void processor_t::register_base_instructions()
extern reg_t rv64e_##name(processor_t*, insn_t, reg_t); \
if (name##_supported) { \
register_insn((insn_desc_t) { \
name##_supported, \
name##_match, \
name##_mask, \
rv32i_##name, \

6
riscv/processor.h

@ -29,7 +29,6 @@ reg_t illegal_instruction(processor_t* p, insn_t insn, reg_t pc);
struct insn_desc_t
{
bool supported;
insn_bits_t match;
insn_bits_t mask;
insn_func_t rv32i;
@ -39,9 +38,6 @@ struct insn_desc_t
insn_func_t func(int xlen, bool rve)
{
if (!supported)
return NULL;
if (rve)
return xlen == 64 ? rv64e : rv32e;
else
@ -50,7 +46,7 @@ struct insn_desc_t
static insn_desc_t illegal()
{
return {true, 0, 0, &illegal_instruction, &illegal_instruction, &illegal_instruction, &illegal_instruction};
return {0, 0, &illegal_instruction, &illegal_instruction, &illegal_instruction, &illegal_instruction};
}
};

8
riscv/rocc.cc

@ -32,10 +32,10 @@ customX(3)
std::vector<insn_desc_t> rocc_t::get_instructions()
{
std::vector<insn_desc_t> insns;
insns.push_back((insn_desc_t){true, 0x0b, 0x7f, &::illegal_instruction, c0, &::illegal_instruction, c0});
insns.push_back((insn_desc_t){true, 0x2b, 0x7f, &::illegal_instruction, c1, &::illegal_instruction, c1});
insns.push_back((insn_desc_t){true, 0x5b, 0x7f, &::illegal_instruction, c2, &::illegal_instruction, c2});
insns.push_back((insn_desc_t){true, 0x7b, 0x7f, &::illegal_instruction, c3, &::illegal_instruction, c3});
insns.push_back((insn_desc_t){0x0b, 0x7f, &::illegal_instruction, c0, &::illegal_instruction, c0});
insns.push_back((insn_desc_t){0x2b, 0x7f, &::illegal_instruction, c1, &::illegal_instruction, c1});
insns.push_back((insn_desc_t){0x5b, 0x7f, &::illegal_instruction, c2, &::illegal_instruction, c2});
insns.push_back((insn_desc_t){0x7b, 0x7f, &::illegal_instruction, c3, &::illegal_instruction, c3});
return insns;
}

Loading…
Cancel
Save