[gem5-dev] Change in gem5/gem5[develop]: arch-power: Add time base instructions

2021-06-30 Thread Boris Shingarov (Gerrit) via gem5-dev
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 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40937
Reviewed-by: Boris Shingarov 
Maintainer: Boris Shingarov 
Tested-by: kokoro 
---
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 
Gerrit-Reviewer: Boris Shingarov 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: arch-power: Add time base instructions

2021-02-07 Thread Sandipan Das (Gerrit) via gem5-dev
Sandipan Das has uploaded this change for review. (  
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 
---
M src/arch/power/insts/integer.cc
M src/arch/power/isa/decoder.isa
2 files changed, 8 insertions(+), 2 deletions(-)



diff --git a/src/arch/power/insts/integer.cc  
b/src/arch/power/insts/integer.cc

index 115b867..c43791b 100644
--- a/src/arch/power/insts/integer.cc
+++ b/src/arch/power/insts/integer.cc
@@ -49,13 +49,17 @@
!myMnemonic.compare("mtxer") ||
!myMnemonic.compare("mtlr")  ||
!myMnemonic.compare("mtctr") ||
-   !myMnemonic.compare("mttar")) {
+   !myMnemonic.compare("mttar") ||
+   !myMnemonic.compare("mttb")  ||
+   !myMnemonic.compare("mttbu")) {
 printDest = false;
 } else if (!myMnemonic.compare("mfcr")  ||
!myMnemonic.compare("mfxer") ||
!myMnemonic.compare("mflr")  ||
!myMnemonic.compare("mfctr") ||
-   !myMnemonic.compare("mftar")) {
+   !myMnemonic.compare("mftar") ||
+   !myMnemonic.compare("mftb")  ||
+   !myMnemonic.compare("mftbu")) {
 printSrcs = false;
 }

diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa
index 4ecee98..aeee29a 100644
--- a/src/arch/power/isa/decoder.isa
+++ b/src/arch/power/isa/decoder.isa
@@ -973,6 +973,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: 1
Gerrit-Owner: Sandipan Das 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s