Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/55887 )

Change subject: arch-x86: Fix a bug in the protected mode IRET.
......................................................................

arch-x86: Fix a bug in the protected mode IRET.

Fix the direction of the comparison which makes sure the new RIP will
fit within the new CS limit.

Change-Id: I3f3e66c185d0e1fbc430b0ae594d63cdd62b9dfd
---
M src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
1 file changed, 13 insertions(+), 1 deletion(-)



diff --git a/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py b/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
index 815f291..7184849 100644
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py +++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/interrupts_and_exceptions.py
@@ -156,7 +156,7 @@
     # appropriate/other RIP checks.
     # if temp_RIP > CS.limit throw #GP(0)
     rdlimit t6, cs, dataSize=8
-    sub t0, t1, t6, flags=(ECF,)
+    sub t0, t6, t1, flags=(ECF,)
     fault "std::make_shared<GeneralProtection>(0)", flags=(CECF,)

     #(temp_CPL!=CPL)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55887
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3f3e66c185d0e1fbc430b0ae594d63cdd62b9dfd
Gerrit-Change-Number: 55887
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to