projects
/
riscv-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Inform GCC that "sfence.vma" clobbers memory
[riscv-tests.git]
/
benchmarks
/
pmp
/
pmp.c
diff --git
a/benchmarks/pmp/pmp.c
b/benchmarks/pmp/pmp.c
index 9d07ed841a7fc1415a24225266703ac19fa65ff9..c263cfd006afc6c2a7de154ea944434f070859b2 100644
(file)
--- a/
benchmarks/pmp/pmp.c
+++ b/
benchmarks/pmp/pmp.c
@@
-137,7
+137,7
@@
INLINE pmpcfg_t set_pmp(pmpcfg_t p)
write_csr(pmpaddr0, p.a0);
write_csr(pmpaddr1, p.a1);
write_csr(pmpcfg0, ((p.cfg << 8) & 0xff00) | (cfg0 & ~0xff00));
- asm volatile ("sfence.vma");
+ asm volatile ("sfence.vma"
::: "memory"
);
return p;
}