aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashanth Mundkur <prashanth.mundkur@gmail.com>2020-09-18 08:04:15 -0700
committerPrashanth Mundkur <prashanth.mundkur@gmail.com>2020-09-18 08:04:15 -0700
commita98aed6a8962ecddc7ca6f7e5d5e223fdab6c82a (patch)
treef8779548273f0506ae8583e876edc14362e9ab8e
parent3d0957ac99b7875e4bd11203b24cec5715980d0b (diff)
downloadsail-riscv-fence_noops.zip
sail-riscv-fence_noops.tar.gz
sail-riscv-fence_noops.tar.bz2
Handle empty predecessor or successor sets in FENCE as no-ops.fence_noops
-rw-r--r--model/riscv_insts_base.sail4
1 files changed, 4 insertions, 0 deletions
diff --git a/model/riscv_insts_base.sail b/model/riscv_insts_base.sail
index 9c3db85..fcfc4fe 100644
--- a/model/riscv_insts_base.sail
+++ b/model/riscv_insts_base.sail
@@ -580,6 +580,8 @@ function clause execute (FENCE(pred, succ)) = {
(_ : bits(2) @ 0b01, _ : bits(2) @ 0b10) => __barrier(Barrier_RISCV_w_r()),
(_ : bits(2) @ 0b00, _ : bits(2) @ 0b00) => (),
+ ( 0b0000, _ : bits(4)) => (),
+ ( _ : bits(4), 0b0000) => (),
_ => { print("FIXME: unsupported fence");
() }
@@ -602,6 +604,8 @@ function clause execute (FENCE(pred, succ)) = {
(_ : bits(2) @ 0b01, _ : bits(2) @ 0b10) => __barrier(Barrier_RISCV_w_r),
(_ : bits(2) @ 0b00, _ : bits(2) @ 0b00) => (),
+ ( 0b0000, _ : bits(4)) => (),
+ ( _ : bits(4), 0b0000) => (),
_ => { print("FIXME: unsupported fence");
() }