arch-x86: Don't load past the end of the far pointer in real mode jmp.
When loading the segment selector from the far pointer, only load two bytes to avoid unnecessarily going beyond a boundary where accesses may not be allowed. Change-Id: I4fc31e3f87815a19232390966c25d156be6a7e92 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55624 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -151,7 +151,7 @@ def macroop JMP_FAR_REAL_M
|
||||
.control_indirect
|
||||
|
||||
lea t1, seg, sib, disp, dataSize=asz
|
||||
ld t2, seg, [1, t0, t1], dsz
|
||||
ld t2, seg, [1, t0, t1], dsz, dataSize=2
|
||||
ld t1, seg, [1, t0, t1]
|
||||
zexti t3, t2, 15, dataSize=8
|
||||
slli t3, t3, 4, dataSize=8
|
||||
|
||||
Reference in New Issue
Block a user