X86: Set up a named constant for the "fold bit" for int register indices.
This commit is contained in:
parent
7b6587fc9c
commit
d85cd08113
5 changed files with 10 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -167,6 +167,9 @@ namespace X86ISA
|
|||
NUM_INTREGS
|
||||
};
|
||||
|
||||
// This needs to be large enough to miss all the other bits of an index.
|
||||
static const IntRegIndex IntFoldBit = (IntRegIndex)(1 << 6);
|
||||
|
||||
inline static IntRegIndex
|
||||
INTREG_MICRO(int index)
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace X86ISA
|
|||
int
|
||||
flattenIntIndex(int reg)
|
||||
{
|
||||
return reg & ~(1 << 6);
|
||||
return reg & ~IntFoldBit;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue