Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/55444 )
Change subject: arch-x86: Fix disassembly of fixed register macroops.
......................................................................
arch-x86: Fix disassembly of fixed register macroops.
These are mapped to instruction definitions like MOV_R_R, even though
one or more of the Rs might have come from a fixed value. Because
MOV_R_R (for instance) is only defined once, using a fixed text constant
there won't work because that can only have one value.
Instead, use a variable which will have the value of that constant so
that the same disassembly code will work no matter what fixed value was
used.
Change-Id: Ie45181c6becce80ad44fa30fc3323757ef713d7c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55444
Tested-by: kokoro <[email protected]>
Reviewed-by: Matt Sinclair <[email protected]>
Maintainer: Matt Sinclair <[email protected]>
Reviewed-by: Gabe Black <[email protected]>
---
M src/arch/x86/isa/specialize.isa
1 file changed, 27 insertions(+), 0 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, but someone else must approve; Looks
good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/x86/isa/specialize.isa
b/src/arch/x86/isa/specialize.isa
index 839b66d..7afdd23 100644
--- a/src/arch/x86/isa/specialize.isa
+++ b/src/arch/x86/isa/specialize.isa
@@ -141,6 +141,10 @@
else:
regString = "INTREG_R%s" % opType.reg
env.addReg(regString)
+ if env.regmUsed:
+ regString = "env.regm"
+ else:
+ regString = "env.reg"
env.addToDisassembly(
"printReg(out, RegId(IntRegClass, %s), regSize);\n" %
regString)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55444
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: Ie45181c6becce80ad44fa30fc3323757ef713d7c
Gerrit-Change-Number: 55444
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bradford Beckmann <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Matt Sinclair <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[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