fix rdar://8456389 - llvm-mc mismatch with 'as' on 'fstp'

-This line, and those below, will be ignored--

M    test/MC/AsmParser/X86/x86_instructions.s
M    lib/Target/X86/AsmParser/X86AsmParser.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-09-22 04:04:03 +00:00
parent 61129252e4
commit 0c289c140e
2 changed files with 14 additions and 0 deletions

View File

@ -1015,6 +1015,14 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
Operands[0] = X86Operand::CreateToken("movsl", NameLoc);
}
// fstp <mem> -> fstps <mem>. Without this, we'll default to fstpl due to
// suffix searching.
if (Name == "fstp" && Operands.size() == 2 &&
static_cast<X86Operand*>(Operands[1])->isMem()) {
delete Operands[0];
Operands[0] = X86Operand::CreateToken("fstps", NameLoc);
}
return false;
}

View File

@ -310,3 +310,9 @@ enter $0x7ace,$0
enter $0x7ace,$1
enter $0x7ace,$0x7f
// rdar://8456389
// CHECK: fstps (%eax)
// CHECK: encoding: [0xd9,0x18]
fstp (%eax)