diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-18 19:06:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-18 19:06:25 +0000 |
commit | 34dd24b0b83885a3992c02ce91fe02c244e83e97 (patch) | |
tree | 303c8509f75adaa2366c2f7cad334705fae66194 /lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | e0f2753bb87f97fbbfc0f6820715156dc4d45b90 (diff) |
Implement exp function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 5bad84ca89..b956ff33f0 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -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; |