diff options
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 78d5a1cad6..a5277c0d2a 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -1978,8 +1978,10 @@ void ISel::emitCastOperation(MachineBasicBlock *BB, break; } case cFP: - assert(0 && "FIXME: implement cast FP to bool"); - abort(); + BMI(BB, IP, X86::FTST, 1).addReg(SrcReg); + BMI(BB, IP, X86::FNSTSWr8, 0); + BMI(BB, IP, X86::SAHF, 1); + break; } // If the zero flag is not set, then the value is true, set the byte to |