summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py b/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py
index 6b21db851..7ebe22e78 100644
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py
+++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py
@@ -69,6 +69,11 @@ def macroop RET_FAR {
# Get the return CS
ld t2, ss, [1, t0, rsp], ssz
+ # increment the stack pointer to pop the instruction pointer
+ # and the code segment from the stack.
+ addi rsp, rsp, dsz
+ addi rsp, rsp, dsz
+
# Get the rpl
andi t3, t2, 0x3