From bfc62d1a7035dfdbad405c0ddbd897ea1174360d Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sat, 1 Dec 2007 23:00:15 -0800 Subject: X86: Separate the effective seg base and the "hidden" seg base. --HG-- extra : convert_revision : 5fcb8d94dbab7a7d6fe797277a5856903c885ad4 --- src/arch/x86/miscregs.hh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/arch/x86/miscregs.hh') diff --git a/src/arch/x86/miscregs.hh b/src/arch/x86/miscregs.hh index 3a30b9800..d3960073a 100644 --- a/src/arch/x86/miscregs.hh +++ b/src/arch/x86/miscregs.hh @@ -270,8 +270,20 @@ namespace X86ISA MISCREG_GS_BASE, MISCREG_INT_BASE, + // The effective segment base, ie what is actually added to an + // address. In 64 bit mode this can be different from the above, + // namely 0. + MISCREG_SEG_EFF_BASE_BASE = MISCREG_SEG_BASE_BASE + NumSegments, + MISCREG_ES_EFF_BASE = MISCREG_SEG_EFF_BASE_BASE, + MISCREG_CS_EFF_BASE, + MISCREG_SS_EFF_BASE, + MISCREG_DS_EFF_BASE, + MISCREG_FS_EFF_BASE, + MISCREG_GS_EFF_BASE, + MISCREG_INT_EFF_BASE, + // Hidden segment limit field - MISCREG_SEG_LIMIT_BASE = MISCREG_SEG_BASE_BASE + NumSegments, + MISCREG_SEG_LIMIT_BASE = MISCREG_SEG_EFF_BASE_BASE + NumSegments, MISCREG_ES_LIMIT = MISCREG_SEG_LIMIT_BASE, MISCREG_CS_LIMIT, MISCREG_SS_LIMIT, @@ -406,6 +418,12 @@ namespace X86ISA return (MiscRegIndex)(MISCREG_SEG_BASE_BASE + index); } + static inline MiscRegIndex + MISCREG_SEG_EFF_BASE(int index) + { + return (MiscRegIndex)(MISCREG_SEG_EFF_BASE_BASE + index); + } + static inline MiscRegIndex MISCREG_SEG_LIMIT(int index) { -- cgit v1.2.3