Sandipan Das has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/40888 )
Change subject: arch-power: Fix disassembly for branch instructions
......................................................................
arch-power: Fix disassembly for branch instructions
This fixes disassembly generated for branch instructions
based on the AA and LK bits which determine how the target
address is calculated and whether a return address needs
to be set implicitly or not.
Change-Id: I1acba72c360a1fcb4691de17fbae1a012a752dbe
Signed-off-by: Sandipan Das <sandi...@linux.ibm.com>
---
M src/arch/power/insts/branch.cc
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/arch/power/insts/branch.cc b/src/arch/power/insts/branch.cc
index 26a3c74..3747bf1 100644
--- a/src/arch/power/insts/branch.cc
+++ b/src/arch/power/insts/branch.cc
@@ -71,7 +71,13 @@
std::stringstream ss;
Addr target;
- ccprintf(ss, "%-10s ", mnemonic);
+ // Generate correct mnemonic
+ std::string myMnemonic(mnemonic);
+
+ // Additional characters depending on isa bits being set
+ if (lkSet) myMnemonic = myMnemonic + "l";
+ if (aaSet) myMnemonic = myMnemonic + "a";
+ ccprintf(ss, "%-10s ", myMnemonic);
if (aaSet) {
target = disp;
@@ -107,7 +113,13 @@
std::stringstream ss;
Addr target;
- ccprintf(ss, "%-10s ", mnemonic);
+ // Generate the correct mnemonic
+ std::string myMnemonic(mnemonic);
+
+ // Additional characters depending on isa bits being set
+ if (lkSet) myMnemonic = myMnemonic + "l";
+ if (aaSet) myMnemonic = myMnemonic + "a";
+ ccprintf(ss, "%-10s ", myMnemonic);
// Print BI and BO fields
ss << crBit << ", " << opts << ", ";
@@ -142,6 +154,11 @@
{
std::stringstream ss;
+ // Generate the correct mnemonic
+ std::string myMnemonic(mnemonic);
+
+ // Additional characters depending on isa bits being set
+ if (lkSet) myMnemonic = myMnemonic + "l";
ccprintf(ss, "%-10s ", mnemonic);
// Print the BI and BO fields
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40888
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: I1acba72c360a1fcb4691de17fbae1a012a752dbe
Gerrit-Change-Number: 40888
Gerrit-PatchSet: 1
Gerrit-Owner: Sandipan Das <sandi...@linux.ibm.com>
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