diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-23 03:21:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-23 03:21:41 +0000 |
commit | 311ca2e51f1c9be1b81a73e7acef4e3564b71ad9 (patch) | |
tree | b6abcea57bba0f4ed4694bb26ca7964b5684e423 /lib/Target/X86/InstSelectSimple.cpp | |
parent | 16865af5d558ab4e3eb1015130daf4c4ddb6278d (diff) |
Implement cast fp -> bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11728 91177308-0d34-0410-b5e6-96231b3b80d8
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 |