changeset 483f5ff33dd1 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=483f5ff33dd1
description:
        x86: increment the stack pointer in lret inst
        The 'lret' instruction reloads instruction pointer and code segment 
from the
        stack and then pops them. But the popping part is missing from the 
current
        implementation. This caused incorrect behavior in some code related to 
the
        Fiasco OS. Microops are being added to rectify the behavior of the 
instruction.

        Committed by: Nilay Vaish <[email protected]>

diffstat:

 src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r fa4eedccce17 -r 483f5ff33dd1 
src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py        
Tue Apr 23 00:03:02 2013 -0500
+++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py        
Tue Apr 23 00:03:04 2013 -0500
@@ -69,6 +69,11 @@
     # 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
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to