mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 11:17:31 +00:00
implement support for finit, PR8258
llvm-svn: 115156
This commit is contained in:
parent
0620ec51f6
commit
8e7a4b7b57
@ -1119,7 +1119,8 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
||||
|
||||
// First, handle aliases that expand to multiple instructions.
|
||||
// FIXME: This should be replaced with a real .td file alias mechanism.
|
||||
if (Op->getToken() == "fstsw" || Op->getToken() == "fstcw") {
|
||||
if (Op->getToken() == "fstsw" || Op->getToken() == "fstcw" ||
|
||||
Op->getToken() == "finit") {
|
||||
MCInst Inst;
|
||||
Inst.setOpcode(X86::WAIT);
|
||||
Out.EmitInstruction(Inst);
|
||||
@ -1129,6 +1130,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
||||
StringSwitch<const char*>(Op->getToken())
|
||||
.Case("fstsw", "fnstsw")
|
||||
.Case("fstcw", "fnstcw")
|
||||
.Case("finit", "fninit")
|
||||
.Default(0);
|
||||
assert(Repl && "Unknown wait-prefixed instruction");
|
||||
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
|
||||
|
@ -421,6 +421,16 @@ fstcw (%rsp)
|
||||
// CHECK: wait
|
||||
// CHECK: fnstcw (%rsp)
|
||||
|
||||
// PR8259
|
||||
fstcw (%rsp)
|
||||
// CHECK: wait
|
||||
// CHECK: fnstcw (%rsp)
|
||||
|
||||
// PR8258
|
||||
finit
|
||||
// CHECK: wait
|
||||
// CHECK: fninit
|
||||
|
||||
|
||||
// rdar://8456382 - cvtsd2si support.
|
||||
cvtsd2si %xmm1, %rax
|
||||
|
Loading…
x
Reference in New Issue
Block a user