Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/56905 )
Change subject: arch-x86: Make m_read_descriptor set desc even for null
sels.
......................................................................
arch-x86: Make m_read_descriptor set desc even for null sels.
If a selector is null, we should still set desc in m_read_descriptor so
that the old value doesn't leak through and affect later processing.
We can do that easily by extracgint the index first, even for null
selectors. Because we put the index in the descriptor register, a null
selector will have the effect of zeroing the descriptor with no extra
uop overhead.
Change-Id: I65020744a6ca71a6c24004ddef32d3974f48d0a4
---
M src/arch/x86/microcode/macros/segmentation.ucode
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/arch/x86/microcode/macros/segmentation.ucode
b/src/arch/x86/microcode/macros/segmentation.ucode
index b956428..bd81dba 100644
--- a/src/arch/x86/microcode/macros/segmentation.ucode
+++ b/src/arch/x86/microcode/macros/segmentation.ucode
@@ -25,13 +25,13 @@
def macro m_read_descriptor desc, selector, label_prefix=rnd_str()
{
+ # Extract the index. Ensure that desc is set even for null selectors.
+ andi {desc}, {selector}, 0xF8, dataSize=8
+
# Check for a null descriptor.
andi t0, {selector}, 0xFC, flags=(EZF,), dataSize=2
br "{label_prefix}_process_desc", flags=(CEZF,)
- # Extract the index.
- andi {desc}, {selector}, 0xF8, dataSize=8
-
# Determine if this descriptor is in the GDT or LDT.
andi t0, {selector}, 0x4, flags=(EZF,), dataSize=2
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56905
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: I65020744a6ca71a6c24004ddef32d3974f48d0a4
Gerrit-Change-Number: 56905
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