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 <sandipan@linux.ibm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40937
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Sandipan Das
2021-02-06 17:22:27 +05:30
committed by Boris Shingarov
parent 09ec394844
commit 01c9f90e6f
2 changed files with 8 additions and 2 deletions

View File

@@ -46,13 +46,17 @@ IntOp::generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const
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;
}

View File

@@ -1023,6 +1023,8 @@ decode PO default Unknown::unknown() {
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 {