[llvm-commits] CVS: llvm/tools/lli/ExternalFunctions.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Dec 19 22:19:00 PST 2002
Changes in directory llvm/tools/lli:
ExternalFunctions.cpp updated: 1.39 -> 1.40
---
Log message:
Add support for isnan
---
Diffs of the changes:
Index: llvm/tools/lli/ExternalFunctions.cpp
diff -u llvm/tools/lli/ExternalFunctions.cpp:1.39 llvm/tools/lli/ExternalFunctions.cpp:1.40
--- llvm/tools/lli/ExternalFunctions.cpp:1.39 Wed Nov 20 12:35:26 2002
+++ llvm/tools/lli/ExternalFunctions.cpp Thu Dec 19 22:18:13 2002
@@ -272,6 +272,14 @@
return GV;
}
+// int isnan(double value);
+GenericValue lle_X_isnan(FunctionType *F, const vector<GenericValue> &Args) {
+ assert(Args.size() == 1);
+ GenericValue GV;
+ GV.IntVal = isnan(Args[0].DoubleVal);
+ return GV;
+}
+
// double floor(double)
GenericValue lle_X_floor(FunctionType *M, const vector<GenericValue> &Args) {
assert(Args.size() == 1);
@@ -627,6 +635,7 @@
FuncNames["lle_X_pow"] = lle_X_pow;
FuncNames["lle_X_exp"] = lle_X_exp;
FuncNames["lle_X_log"] = lle_X_log;
+ FuncNames["lle_X_isnan"] = lle_X_isnan;
FuncNames["lle_X_floor"] = lle_X_floor;
FuncNames["lle_X_srand"] = lle_X_srand;
FuncNames["lle_X_drand48"] = lle_X_drand48;
More information about the llvm-commits
mailing list