diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2008-06-12 00:49:16 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2008-06-12 00:49:16 -0400 |
commit | bbc1f394ffd9d3add42494ad852ac29c3e5e7711 (patch) | |
tree | 17822974587f6a4f597e4e43a6444d4c3bf968c6 /src/arch/x86 | |
parent | 6106b05b6e9cabe3a06da8407818479a5781d249 (diff) | |
download | gem5-bbc1f394ffd9d3add42494ad852ac29c3e5e7711.tar.xz |
X86: Truncate descriptors to 16 bits.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa/microops/regop.isa | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa index 03a7515ed..35f1fef02 100644 --- a/src/arch/x86/isa/microops/regop.isa +++ b/src/arch/x86/isa/microops/regop.isa @@ -988,20 +988,20 @@ let {{ class Chks(SegOp): code = ''' - // The selector is in source 1. + // The selector is in source 1 and can be at most 16 bits. SegSelector selector = psrc1; // Compute the address of the descriptor and set DestReg to it. if (selector.ti) { // A descriptor in the LDT - Addr target = (selector.esi << 3) + LDTRBase; - if (!LDTRSel || (selector.esi << 3) + dataSize > LDTRLimit) + Addr target = (selector.si << 3) + LDTRBase; + if (!LDTRSel || (selector.si << 3) + dataSize > LDTRLimit) fault = new GeneralProtection(selector & mask(16)); DestReg = target; } else { // A descriptor in the GDT - Addr target = (selector.esi << 3) + GDTRBase; - if ((selector.esi << 3) + dataSize > GDTRLimit) + Addr target = (selector.si << 3) + GDTRBase; + if ((selector.si << 3) + dataSize > GDTRLimit) fault = new GeneralProtection(selector & mask(16)); DestReg = target; } @@ -1009,7 +1009,7 @@ let {{ flag_code = ''' // Check for a NULL selector and set ZF,EZF appropriately. ccFlagBits = ccFlagBits & ~(ext & (ZFBit | EZFBit)); - if (!selector.esi && !selector.ti) + if (!selector.si && !selector.ti) ccFlagBits = ccFlagBits | (ext & (ZFBit | EZFBit)); ''' |