Nils Asmussen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/25656 )

Change subject: arch-riscv: make uret,sret,mret SerializeAfter,NonSpeculative.
......................................................................

arch-riscv: make uret,sret,mret SerializeAfter,NonSpeculative.

These instructions potentially change the privilege level, upon which
the execution of other instructions depends. For that reason, we need to
make *ret SerializeAfter and we also don't want to execute them
speculatively.

Change-Id: If3b5ba6ec3b4102d53c51cf723eba5d5da3eaa2f
---
M src/arch/riscv/isa/decoder.isa
1 file changed, 3 insertions(+), 3 deletions(-)



diff --git a/src/arch/riscv/isa/decoder.isa b/src/arch/riscv/isa/decoder.isa
index 5de3eee..4f0a90a 100644
--- a/src/arch/riscv/isa/decoder.isa
+++ b/src/arch/riscv/isa/decoder.isa
@@ -1775,7 +1775,7 @@
                             status.upie = 1;
                             xc->setMiscReg(MISCREG_STATUS, status);
                             NPC = xc->readMiscReg(MISCREG_UEPC);
-                        }}, IsReturn);
+                        }}, IsSerializeAfter, IsNonSpeculative, IsReturn);
                     }
                     0x8: decode RS2 {
                         0x2: sret({{
@@ -1796,7 +1796,7 @@
                                 xc->setMiscReg(MISCREG_STATUS, status);
                                 NPC = xc->readMiscReg(MISCREG_SEPC);
                             }
-                        }}, IsReturn);
+                        }}, IsSerializeAfter, IsNonSpeculative, IsReturn);
                         0x5: wfi({{
STATUS status = xc->readMiscReg(MISCREG_STATUS);
                             auto pm = (PrivilegeMode)xc->readMiscReg(
@@ -1835,7 +1835,7 @@
                             xc->setMiscReg(MISCREG_STATUS, status);
                             NPC = xc->readMiscReg(MISCREG_MEPC);
                         }
-                    }}, IsReturn);
+                    }}, IsSerializeAfter, IsNonSpeculative, IsReturn);
                 }
             }
             format CSROp {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25656
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: If3b5ba6ec3b4102d53c51cf723eba5d5da3eaa2f
Gerrit-Change-Number: 25656
Gerrit-PatchSet: 1
Gerrit-Owner: Nils Asmussen <nils.asmus...@barkhauseninstitut.org>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to