mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-27 14:07:32 +00:00
Implement log and drand48 for TSP bm
llvm-svn: 1165
This commit is contained in:
parent
6dde80a780
commit
06d10f646d
@ -229,6 +229,23 @@ GenericValue lle_X_sqrt(MethodType *M, const vector<GenericValue> &Args) {
|
||||
return GV;
|
||||
}
|
||||
|
||||
// double log(double)
|
||||
GenericValue lle_X_log(MethodType *M, const vector<GenericValue> &Args) {
|
||||
assert(Args.size() == 1);
|
||||
GenericValue GV;
|
||||
GV.DoubleVal = log(Args[0].DoubleVal);
|
||||
return GV;
|
||||
}
|
||||
|
||||
// double drand48()
|
||||
GenericValue lle_X_drand48(MethodType *M, const vector<GenericValue> &Args) {
|
||||
assert(Args.size() == 0);
|
||||
GenericValue GV;
|
||||
GV.DoubleVal = drand48();
|
||||
return GV;
|
||||
}
|
||||
|
||||
|
||||
// int printf(sbyte *, ...) - a very rough implementation to make output useful.
|
||||
GenericValue lle_X_printf(MethodType *M, const vector<GenericValue> &Args) {
|
||||
const char *FmtStr = (const char *)Args[0].PointerVal;
|
||||
|
Loading…
Reference in New Issue
Block a user