mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
preemptively add the rest of the non-n fpstack instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1120,7 +1120,8 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
|||||||
// First, handle aliases that expand to multiple instructions.
|
// First, handle aliases that expand to multiple instructions.
|
||||||
// FIXME: This should be replaced with a real .td file alias mechanism.
|
// 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") {
|
Op->getToken() == "finit" || Op->getToken() == "fsave" ||
|
||||||
|
Op->getToken() == "fstenv") {
|
||||||
MCInst Inst;
|
MCInst Inst;
|
||||||
Inst.setOpcode(X86::WAIT);
|
Inst.setOpcode(X86::WAIT);
|
||||||
Out.EmitInstruction(Inst);
|
Out.EmitInstruction(Inst);
|
||||||
@@ -1128,9 +1129,11 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
|||||||
delete Operands[0];
|
delete Operands[0];
|
||||||
const char *Repl =
|
const char *Repl =
|
||||||
StringSwitch<const char*>(Op->getToken())
|
StringSwitch<const char*>(Op->getToken())
|
||||||
.Case("fstsw", "fnstsw")
|
|
||||||
.Case("fstcw", "fnstcw")
|
|
||||||
.Case("finit", "fninit")
|
.Case("finit", "fninit")
|
||||||
|
.Case("fsave", "fnsave")
|
||||||
|
.Case("fstcw", "fnstcw")
|
||||||
|
.Case("fstenv", "fnstenv")
|
||||||
|
.Case("fstsw", "fnstsw")
|
||||||
.Default(0);
|
.Default(0);
|
||||||
assert(Repl && "Unknown wait-prefixed instruction");
|
assert(Repl && "Unknown wait-prefixed instruction");
|
||||||
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
|
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
|
||||||
|
@@ -431,6 +431,10 @@ finit
|
|||||||
// CHECK: wait
|
// CHECK: wait
|
||||||
// CHECK: fninit
|
// CHECK: fninit
|
||||||
|
|
||||||
|
fsave 32493
|
||||||
|
// CHECK: wait
|
||||||
|
// CHECK: fnsave 32493
|
||||||
|
|
||||||
|
|
||||||
// rdar://8456382 - cvtsd2si support.
|
// rdar://8456382 - cvtsd2si support.
|
||||||
cvtsd2si %xmm1, %rax
|
cvtsd2si %xmm1, %rax
|
||||||
|
Reference in New Issue
Block a user