forked from OSchip/llvm-project
MC/X86: Add temporary hack to match shrl $1,%eax correctly, to support testing
other functionality on 403.gcc compiled at -O0. llvm-svn: 98405
This commit is contained in:
parent
b86672059e
commit
18fc344290
|
@ -542,6 +542,15 @@ ParseInstruction(const StringRef &Name, SMLoc NameLoc,
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Hack to handle recognizing s{hr,ar,hl}? $1.
|
||||
if ((Name.startswith("shr") || Name.startswith("sar") ||
|
||||
Name.startswith("shl")) &&
|
||||
Operands.size() == 3 &&
|
||||
static_cast<X86Operand*>(Operands[1])->isImm() &&
|
||||
isa<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm()) &&
|
||||
cast<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm())->getValue() == 1)
|
||||
Operands.erase(Operands.begin() + 1);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,3 +47,6 @@ rdtscp
|
|||
|
||||
// CHECK: addw %ax, %ax # encoding: [0x66,0x01,0xc0]
|
||||
addw %ax, %ax
|
||||
|
||||
// CHECK: shrl %eax # encoding: [0xd1,0xe8]
|
||||
shrl $1, %eax
|
||||
|
|
Loading…
Reference in New Issue