diff options
-rw-r--r-- | riscv/common.h | 2 | ||||
-rw-r--r-- | riscv/disasm.h | 4 | ||||
-rw-r--r-- | spike_main/disasm.cc | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/riscv/common.h b/riscv/common.h index 8ddd984..3c523d0 100644 --- a/riscv/common.h +++ b/riscv/common.h @@ -6,4 +6,6 @@ #define likely(x) __builtin_expect(x, 1) #define unlikely(x) __builtin_expect(x, 0) +#define NOINLINE __attribute__ ((noinline)) + #endif diff --git a/riscv/disasm.h b/riscv/disasm.h index e465fca..88d0e9b 100644 --- a/riscv/disasm.h +++ b/riscv/disasm.h @@ -30,8 +30,8 @@ struct : public arg_t { class disasm_insn_t { public: - disasm_insn_t(const char* name, uint32_t match, uint32_t mask, - const std::vector<const arg_t*>& args) + NOINLINE disasm_insn_t(const char* name, uint32_t match, uint32_t mask, + const std::vector<const arg_t*>& args) : match(match), mask(mask), args(args), name(strdup(name)) {} ~disasm_insn_t() { free(const_cast<char *>(name)); } diff --git a/spike_main/disasm.cc b/spike_main/disasm.cc index 6c16ecb..0e36a4b 100644 --- a/spike_main/disasm.cc +++ b/spike_main/disasm.cc @@ -1149,7 +1149,7 @@ const disasm_insn_t* disassembler_t::lookup(insn_t insn) const return NULL; } -void disassembler_t::add_insn(disasm_insn_t* insn) +void NOINLINE disassembler_t::add_insn(disasm_insn_t* insn) { size_t idx = HASH_SIZE; if (insn->get_mask() % HASH_SIZE == HASH_SIZE - 1) |