Skip to content

Commit

Permalink
riscv_atomics: Un-inline AMO decoder
Browse files Browse the repository at this point in the history
- Inlining atomics into the interpreter pessimizes it (At least on GCC)
- Atomics are slow anyways (Especially RMW ones), loads/stores are already handled properly
- Improves performance with USE_JIT=0, also TODO: atomics JIT
  • Loading branch information
LekKit committed Dec 24, 2024
1 parent 19227f4 commit f841167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpu/riscv_atomics.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static forceinline void riscv_emulate_atomic_d(rvvm_hart_t* vm, const uint32_t i

#endif

static forceinline void riscv_emulate_a_opc_amo(rvvm_hart_t* vm, const uint32_t insn)
static no_inline void riscv_emulate_a_opc_amo(rvvm_hart_t* vm, const uint32_t insn)
{
const uint32_t funct3 = bit_cut(insn, 12, 3);
switch (funct3) {
Expand Down

0 comments on commit f841167

Please sign in to comment.