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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55592 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -1162,7 +1162,7 @@ let {{
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user