1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Implement exp function

llvm-svn: 1774
This commit is contained in:
Chris Lattner 2002-02-18 19:06:25 +00:00
parent 3d83ea4268
commit 801f59eb1f

View File

@ -232,6 +232,14 @@ GenericValue lle_X_pow(MethodType *M, const vector<GenericValue> &Args) {
return GV;
}
// double exp(double)
GenericValue lle_X_exp(MethodType *M, const vector<GenericValue> &Args) {
assert(Args.size() == 1);
GenericValue GV;
GV.DoubleVal = exp(Args[0].DoubleVal);
return GV;
}
// double sqrt(double)
GenericValue lle_X_sqrt(MethodType *M, const vector<GenericValue> &Args) {
assert(Args.size() == 1);
@ -398,6 +406,7 @@ void Interpreter::initializeExternalMethods() {
FuncNames["lle_X_free"] = lle_X_free;
FuncNames["lle_X_atoi"] = lle_X_atoi;
FuncNames["lle_X_pow"] = lle_X_pow;
FuncNames["lle_X_exp"] = lle_X_exp;
FuncNames["lle_X_log"] = lle_X_log;
FuncNames["lle_X_floor"] = lle_X_floor;
FuncNames["lle_X_srand"] = lle_X_srand;