From d85cd08113e61817fdf1df978f2713ba8b094996 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 17 Jul 2009 18:49:22 -0700 Subject: X86: Set up a named constant for the "fold bit" for int register indices. --- src/arch/x86/insts/microregop.cc | 2 +- src/arch/x86/insts/static_inst.cc | 4 ++-- src/arch/x86/insts/static_inst.hh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/arch/x86/insts') diff --git a/src/arch/x86/insts/microregop.cc b/src/arch/x86/insts/microregop.cc index 2ea975746..2edd3ba87 100644 --- a/src/arch/x86/insts/microregop.cc +++ b/src/arch/x86/insts/microregop.cc @@ -67,7 +67,7 @@ namespace X86ISA bool subtract) const { DPRINTF(X86, "flagMask = %#x\n", flagMask); - if (_destRegIdx[0] & (1 << 6)) { + if (_destRegIdx[0] & IntFoldBit) { _dest >>= 8; } uint64_t flags = oldFlags & ~flagMask; diff --git a/src/arch/x86/insts/static_inst.cc b/src/arch/x86/insts/static_inst.cc index 0820a47d4..4f48c4c59 100644 --- a/src/arch/x86/insts/static_inst.cc +++ b/src/arch/x86/insts/static_inst.cc @@ -149,8 +149,8 @@ namespace X86ISA if (reg < FP_Base_DepTag) { const char * suffix = ""; - bool fold = reg & (1 << 6); - reg &= ~(1 << 6); + bool fold = reg & IntFoldBit; + reg &= ~IntFoldBit; if(fold) suffix = "h"; diff --git a/src/arch/x86/insts/static_inst.hh b/src/arch/x86/insts/static_inst.hh index 4ca7a4984..32065f7c0 100644 --- a/src/arch/x86/insts/static_inst.hh +++ b/src/arch/x86/insts/static_inst.hh @@ -108,7 +108,7 @@ namespace X86ISA inline uint64_t merge(uint64_t into, uint64_t val, int size) const { X86IntReg reg = into; - if(_destRegIdx[0] & (1 << 6)) + if(_destRegIdx[0] & IntFoldBit) { reg.H = val; return reg; @@ -139,7 +139,7 @@ namespace X86ISA { X86IntReg reg = from; DPRINTF(X86, "Picking with size %d\n", size); - if(_srcRegIdx[idx] & (1 << 6)) + if(_srcRegIdx[idx] & IntFoldBit) return reg.H; switch(size) { @@ -160,7 +160,7 @@ namespace X86ISA { X86IntReg reg = from; DPRINTF(X86, "Picking with size %d\n", size); - if(_srcRegIdx[idx] & (1 << 6)) + if(_srcRegIdx[idx] & IntFoldBit) return reg.SH; switch(size) { -- cgit v1.2.3