aboutsummaryrefslogtreecommitdiff
path: root/riscv/mmu.h
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2022-07-18 15:15:41 -0700
committerAndrew Waterman <andrew@sifive.com>2022-07-18 15:15:41 -0700
commitb0d9782e13156abd5884fa73017a0286441202d1 (patch)
tree154a16095707eab7ac4729b78cf50851e02b0282 /riscv/mmu.h
parent84b9d03c088af3a92505c82ff3160d984387248c (diff)
downloadspike-b0d9782e13156abd5884fa73017a0286441202d1.zip
spike-b0d9782e13156abd5884fa73017a0286441202d1.tar.gz
spike-b0d9782e13156abd5884fa73017a0286441202d1.tar.bz2
Fix load/store performance under clang
Hopefully for the last time :-)
Diffstat (limited to 'riscv/mmu.h')
-rw-r--r--riscv/mmu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscv/mmu.h b/riscv/mmu.h
index 4e12805..6f24ec7 100644
--- a/riscv/mmu.h
+++ b/riscv/mmu.h
@@ -99,7 +99,7 @@ public:
// template for functions that load an aligned value from memory
#define load_func(type, prefix, xlate_flags) \
- inline type##_t prefix##_##type(reg_t addr, bool require_alignment = false) { \
+ type##_t ALWAYS_INLINE prefix##_##type(reg_t addr, bool require_alignment = false) { \
if (unlikely(addr & (sizeof(type##_t)-1))) { \
if (require_alignment) load_reserved_address_misaligned(addr); \
else return misaligned_load(addr, sizeof(type##_t), xlate_flags); \
@@ -162,7 +162,7 @@ public:
// template for functions that store an aligned value to memory
#define store_func(type, prefix, xlate_flags) \
- void prefix##_##type(reg_t addr, type##_t val, bool actually_store=true, bool require_alignment=false) { \
+ void ALWAYS_INLINE prefix##_##type(reg_t addr, type##_t val, bool actually_store=true, bool require_alignment=false) { \
if (unlikely(addr & (sizeof(type##_t)-1))) { \
if (require_alignment) store_conditional_address_misaligned(addr); \
else return misaligned_store(addr, val, sizeof(type##_t), xlate_flags, actually_store); \