Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/55592 )

Change subject: arch-x86: Truncate RIPs properly in the wrip microop.
......................................................................

arch-x86: Truncate RIPs properly in the wrip microop.

For all instructions which affect the RIP, they are supposed to
truncate/zero extend the RIP based on the width of the instruction. We
should do that after the target is calculated by adding the two operands
together, but before adding in the segment base address.

Change-Id: I105e58de6a07c7aa3155a9a188d8877c2955651f
---
M src/arch/x86/isa/microops/regop.isa
1 file changed, 15 insertions(+), 1 deletion(-)



diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index d37cb6f..d56e17c 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -1162,7 +1162,7 @@
         code = 'DoubleBits = PSrcReg1 ^ op2;'

     class Wrip(WrRegOp, CondRegOp):
-        code = 'NRIP = PSrcReg1 + sop2 + CSBase;'
+        code = 'NRIP = ((SrcReg1 + sop2) & mask(dataSize * 8)) + CSBase;'
         else_code = "NRIP = NRIP;"

     class Wruflags(WrRegOp):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55592
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: I105e58de6a07c7aa3155a9a188d8877c2955651f
Gerrit-Change-Number: 55592
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.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

Reply via email to