Skip to content

Commit e209647

Browse files
author
Stanislav Shwartsman
committed
fixed UINTR reading arguments (RIP/RSP/RFLAGS) from stack
1 parent abb3c4b commit e209647

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bochs/cpu/uintr.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::UIRET(bxInstruction_c *i)
8888

8989
BX_INSTR_FAR_BRANCH_ORIGIN();
9090

91-
Bit64u new_rip = stack_read_qword(RSP + 8);
92-
Bit32u new_eflags = (Bit32u) stack_read_qword(RSP + 16);
93-
Bit64u new_rsp = stack_read_qword(RSP + 24);
91+
Bit64u new_rip = stack_read_qword(RSP);
92+
Bit32u new_eflags = (Bit32u) stack_read_qword(RSP + 8);
93+
Bit64u new_rsp = stack_read_qword(RSP + 16);
9494

9595
if (!IsCanonical(new_rip)) {
9696
BX_ERROR(("UIRET #GP(0): return RIP is not canonical"));

0 commit comments

Comments
 (0)