Inform GCC that "sfence.vma" clobbers memory
authorPalmer Dabbelt <palmer@dabbelt.com>
Wed, 16 Aug 2017 19:26:25 +0000 (12:26 -0700)
committerPalmer Dabbelt <palmer@dabbelt.com>
Wed, 16 Aug 2017 19:27:02 +0000 (12:27 -0700)
benchmarks/pmp/pmp.c
env

index 9d07ed841a7fc1415a24225266703ac19fa65ff9..c263cfd006afc6c2a7de154ea944434f070859b2 100644 (file)
@@ -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;
 }
 
diff --git a/env b/env
index db0bfa223142e56b17dae6d92610f195014bbb80..1b76fd1f1c63dfe4cea93f426434a7384d2bf801 160000 (submodule)
--- a/env
+++ b/env
@@ -1 +1 @@
-Subproject commit db0bfa223142e56b17dae6d92610f195014bbb80
+Subproject commit 1b76fd1f1c63dfe4cea93f426434a7384d2bf801