Boris Shingarov has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/40937 )

Change subject: arch-power: Add time base instructions
......................................................................

arch-power: Add time base instructions

This models a pseudo time base using the simulator ticks
and adds the following instructions.
  * Move From Time Base (mftb)
  * Move From Time Base Upper (mftbu)

Change-Id: Idb619ec3179b2a85925998282075bde8651c68c2
Signed-off-by: Sandipan Das <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40937
Reviewed-by: Boris Shingarov <[email protected]>
Maintainer: Boris Shingarov <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/power/insts/integer.cc
M src/arch/power/isa/decoder.isa
2 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Boris Shingarov: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/power/insts/integer.cc b/src/arch/power/insts/integer.cc
index 7795b50..18a72ab 100644
--- a/src/arch/power/insts/integer.cc
+++ b/src/arch/power/insts/integer.cc
@@ -46,13 +46,17 @@
         myMnemonic == "mtxer" ||
         myMnemonic == "mtlr"  ||
         myMnemonic == "mtctr" ||
-        myMnemonic == "mttar") {
+        myMnemonic == "mttar" ||
+        myMnemonic == "mttb"  ||
+        myMnemonic == "mttbu") {
         printDest = false;
     } else if (myMnemonic == "mfcr"  ||
                myMnemonic == "mfxer" ||
                myMnemonic == "mflr"  ||
                myMnemonic == "mfctr" ||
-               myMnemonic == "mftar") {
+               myMnemonic == "mftar" ||
+               myMnemonic == "mftb"  ||
+               myMnemonic == "mftbu") {
         printSrcs = false;
     }

diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa
index d752630..461e2cb 100644
--- a/src/arch/power/isa/decoder.isa
+++ b/src/arch/power/isa/decoder.isa
@@ -1023,6 +1023,8 @@
                             0x100: mflr({{ Rt = LR; }});
                             0x120: mfctr({{ Rt = CTR; }});
                             0x1f9: mftar({{ Rt = TAR; }});
+                            0x188: mftb({{ Rt = curTick(); }});
+                            0x1a8: mftbu({{ Rt_uw = curTick() >> 32; }});
                         }

                         467: decode SPR {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40937
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: Idb619ec3179b2a85925998282075bde8651c68c2
Gerrit-Change-Number: 40937
Gerrit-PatchSet: 10
Gerrit-Owner: Sandipan Das <[email protected]>
Gerrit-Reviewer: Boris Shingarov <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to