[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 22 21:22:02 PST 2004
Changes in directory llvm/lib/Target/X86:
InstSelectSimple.cpp updated: 1.170 -> 1.171
---
Log message:
Implement cast fp -> bool
---
Diffs of the changes: (+4 -2)
Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.170 llvm/lib/Target/X86/InstSelectSimple.cpp:1.171
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.170 Sun Feb 22 21:10:10 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp Sun Feb 22 21:21:41 2004
@@ -1978,8 +1978,10 @@
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
More information about the llvm-commits
mailing list