blob: c2584e813803d13dbd805096ef542598c340dcdf [file] [log] [blame]
Zonr Chang1e2adce2012-04-12 13:29:43 +08001/*
2 * Copyright 2012, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//#define LOG_NDEBUG 0
Stephen Hinese198abe2012-07-27 18:05:41 -070018#include "bcc/Renderscript/RSInfo.h"
Zonr Chang1e2adce2012-04-12 13:29:43 +080019
Zonr Changf2907932012-04-13 11:56:21 +080020#include <dlfcn.h>
21
Zonr Chang1e2adce2012-04-12 13:29:43 +080022#include <cstring>
23#include <new>
Stephen Hines688e4c02012-12-12 18:04:18 -080024#include <string>
Zonr Chang1e2adce2012-04-12 13:29:43 +080025
Zonr Changc72c4dd2012-04-12 15:38:53 +080026#include "bcc/Support/FileBase.h"
Zonr Changef73a242012-04-12 16:44:01 +080027#include "bcc/Support/Log.h"
Zonr Chang1e2adce2012-04-12 13:29:43 +080028
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -070029#include <cutils/properties.h>
30
Zonr Chang1e2adce2012-04-12 13:29:43 +080031using namespace bcc;
32
33const char RSInfo::LibBCCPath[] = "/system/lib/libbcc.so";
Shih-wei Liaof7401ab2013-01-25 16:29:44 -080034const char RSInfo::LibCompilerRTPath[] = "/system/lib/libcompiler_rt.so";
Zonr Chang1e2adce2012-04-12 13:29:43 +080035const char RSInfo::LibRSPath[] = "/system/lib/libRS.so";
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070036const char RSInfo::LibCLCorePath[] = "/system/lib/libclcore.bc";
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070037#if defined(ARCH_ARM_HAVE_NEON)
38const char RSInfo::LibCLCoreNEONPath[] = "/system/lib/libclcore_neon.bc";
39#endif
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070040
Zonr Changf2907932012-04-13 11:56:21 +080041const uint8_t *RSInfo::LibBCCSHA1 = NULL;
Shih-wei Liaof7401ab2013-01-25 16:29:44 -080042const uint8_t *RSInfo::LibCompilerRTSHA1 = NULL;
Zonr Changf2907932012-04-13 11:56:21 +080043const uint8_t *RSInfo::LibRSSHA1 = NULL;
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070044const uint8_t *RSInfo::LibCLCoreSHA1 = NULL;
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070045#if defined(ARCH_ARM_HAVE_NEON)
46const uint8_t *RSInfo::LibCLCoreNEONSHA1 = NULL;
47#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +080048
Stephen Hines331310e2012-10-26 19:27:55 -070049bool RSInfo::LoadBuiltInSHA1Information() {
50#ifdef TARGET_BUILD
Zonr Changf2907932012-04-13 11:56:21 +080051 if (LibBCCSHA1 != NULL) {
52 // Loaded before.
Stephen Hines331310e2012-10-26 19:27:55 -070053 return true;
Zonr Chang1e2adce2012-04-12 13:29:43 +080054 }
55
Zonr Changf2907932012-04-13 11:56:21 +080056 void *h = ::dlopen("/system/lib/libbcc.sha1.so", RTLD_LAZY | RTLD_NOW);
57 if (h == NULL) {
58 ALOGE("Failed to load SHA-1 information from shared library '"
59 "/system/lib/libbcc.sha1.so'! (%s)", ::dlerror());
Stephen Hines331310e2012-10-26 19:27:55 -070060 return false;
Zonr Changf2907932012-04-13 11:56:21 +080061 }
Zonr Chang1e2adce2012-04-12 13:29:43 +080062
Zonr Changf2907932012-04-13 11:56:21 +080063 LibBCCSHA1 = reinterpret_cast<const uint8_t *>(::dlsym(h, "libbcc_so_SHA1"));
Shih-wei Liaof7401ab2013-01-25 16:29:44 -080064 LibCompilerRTSHA1 =
65 reinterpret_cast<const uint8_t *>(::dlsym(h, "libcompiler_rt_so_SHA1"));
Zonr Changf2907932012-04-13 11:56:21 +080066 LibRSSHA1 = reinterpret_cast<const uint8_t *>(::dlsym(h, "libRS_so_SHA1"));
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070067 LibCLCoreSHA1 =
68 reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_bc_SHA1"));
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070069#if defined(ARCH_ARM_HAVE_NEON)
70 LibCLCoreNEONSHA1 =
71 reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_neon_bc_SHA1"));
72#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +080073
Stephen Hines331310e2012-10-26 19:27:55 -070074 return true;
75#else // TARGET_BUILD
76 return false;
77#endif // TARGET_BUILD
Zonr Chang1e2adce2012-04-12 13:29:43 +080078}
79
80android::String8 RSInfo::GetPath(const FileBase &pFile) {
81 android::String8 result(pFile.getName().c_str());
82 result.append(".info");
83 return result;
84}
85
86#define PRINT_DEPENDENCY(PREFIX, N, X) \
87 ALOGV("\t" PREFIX "Source name: %s, " \
88 "SHA-1: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" \
89 "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", \
90 (N), (X)[ 0], (X)[ 1], (X)[ 2], (X)[ 3], (X)[ 4], (X)[ 5], \
91 (X)[ 6], (X)[ 7], (X)[ 8], (X)[ 9], (X)[10], (X)[11], \
92 (X)[12], (X)[13], (X)[14], (X)[15], (X)[16], (X)[17], \
93 (X)[18], (X)[19]);
94
95bool RSInfo::CheckDependency(const RSInfo &pInfo,
96 const char *pInputFilename,
Shih-wei Liao7bcec852012-04-25 04:07:09 -070097 const DependencyTableTy &pDeps) {
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070098 // Built-in dependencies are libbcc.so, libRS.so and libclcore.bc plus
99 // libclcore_neon.bc if NEON is available on the target device.
100#if !defined(ARCH_ARM_HAVE_NEON)
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700101 static const unsigned NumBuiltInDependencies = 4;
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800102#else
103 static const unsigned NumBuiltInDependencies = 5;
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700104#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +0800105
106 LoadBuiltInSHA1Information();
107
108 if (pInfo.mDependencyTable.size() != (pDeps.size() + NumBuiltInDependencies)) {
109 ALOGD("Number of dependencies recorded mismatch (%lu v.s. %lu) in %s!",
110 static_cast<unsigned long>(pInfo.mDependencyTable.size()),
111 static_cast<unsigned long>(pDeps.size()), pInputFilename);
112 return false;
113 } else {
114 // Built-in dependencies always go first.
115 const std::pair<const char *, const uint8_t *> &cache_libbcc_dep =
116 pInfo.mDependencyTable[0];
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800117 const std::pair<const char *, const uint8_t *> &cache_libcompiler_rt_dep =
Zonr Chang1e2adce2012-04-12 13:29:43 +0800118 pInfo.mDependencyTable[1];
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800119 const std::pair<const char *, const uint8_t *> &cache_libRS_dep =
Shih-wei Liao2665c2f2012-04-25 04:06:52 -0700120 pInfo.mDependencyTable[2];
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800121 const std::pair<const char *, const uint8_t *> &cache_libclcore_dep =
122 pInfo.mDependencyTable[3];
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700123#if defined(ARCH_ARM_HAVE_NEON)
124 const std::pair<const char *, const uint8_t *> &cache_libclcore_neon_dep =
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800125 pInfo.mDependencyTable[4];
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700126#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +0800127
128 // Check libbcc.so.
Zonr Changf2907932012-04-13 11:56:21 +0800129 if (::memcmp(cache_libbcc_dep.second, LibBCCSHA1, SHA1_DIGEST_LENGTH) != 0) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800130 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
131 LibBCCPath);
132 PRINT_DEPENDENCY("current - ", LibBCCPath, LibBCCSHA1);
133 PRINT_DEPENDENCY("cache - ", cache_libbcc_dep.first,
134 cache_libbcc_dep.second);
135 return false;
136 }
137
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800138 // Check libcompiler_rt.so.
139 if (::memcmp(cache_libcompiler_rt_dep.second, LibCompilerRTSHA1,
140 SHA1_DIGEST_LENGTH) != 0) {
141 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
142 LibCompilerRTPath);
143 PRINT_DEPENDENCY("current - ", LibCompilerRTPath, LibCompilerRTSHA1);
144 PRINT_DEPENDENCY("cache - ", cache_libcompiler_rt_dep.first,
145 cache_libcompiler_rt_dep.second);
146 return false;
147 }
148
Zonr Chang1e2adce2012-04-12 13:29:43 +0800149 // Check libRS.so.
Zonr Changf2907932012-04-13 11:56:21 +0800150 if (::memcmp(cache_libRS_dep.second, LibRSSHA1, SHA1_DIGEST_LENGTH) != 0) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800151 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
152 LibRSPath);
153 PRINT_DEPENDENCY("current - ", LibRSPath, LibRSSHA1);
154 PRINT_DEPENDENCY("cache - ", cache_libRS_dep.first,
155 cache_libRS_dep.second);
156 return false;
157 }
158
Shih-wei Liao2665c2f2012-04-25 04:06:52 -0700159 // Check libclcore.bc.
160 if (::memcmp(cache_libclcore_dep.second, LibCLCoreSHA1,
161 SHA1_DIGEST_LENGTH) != 0) {
162 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
163 LibRSPath);
164 PRINT_DEPENDENCY("current - ", LibCLCorePath, LibCLCoreSHA1);
165 PRINT_DEPENDENCY("cache - ", cache_libclcore_dep.first,
166 cache_libclcore_dep.second);
167 return false;
168 }
169
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700170#if defined(ARCH_ARM_HAVE_NEON)
171 // Check libclcore_neon.bc if NEON is available.
172 if (::memcmp(cache_libclcore_neon_dep.second, LibCLCoreNEONSHA1,
173 SHA1_DIGEST_LENGTH) != 0) {
174 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
175 LibRSPath);
176 PRINT_DEPENDENCY("current - ", LibCLCoreNEONPath, LibCLCoreNEONSHA1);
177 PRINT_DEPENDENCY("cache - ", cache_libclcore_neon_dep.first,
178 cache_libclcore_neon_dep.second);
179 return false;
180 }
181#endif
182
Zonr Chang1e2adce2012-04-12 13:29:43 +0800183 for (unsigned i = 0; i < pDeps.size(); i++) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800184 const std::pair<const char *, const uint8_t *> &cache_dep =
185 pInfo.mDependencyTable[i + NumBuiltInDependencies];
186
Shih-wei Liao7bcec852012-04-25 04:07:09 -0700187 if ((::strcmp(pDeps[i].first, cache_dep.first) != 0) ||
188 (::memcmp(pDeps[i].second, cache_dep.second,
Zonr Changf2907932012-04-13 11:56:21 +0800189 SHA1_DIGEST_LENGTH) != 0)) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800190 ALOGD("Cache %s is dirty due to the source it dependends on has been "
191 "changed:", pInputFilename);
Shih-wei Liao7bcec852012-04-25 04:07:09 -0700192 PRINT_DEPENDENCY("given - ", pDeps[i].first, pDeps[i].second);
Zonr Chang1e2adce2012-04-12 13:29:43 +0800193 PRINT_DEPENDENCY("cache - ", cache_dep.first, cache_dep.second);
194 return false;
195 }
196 }
197 }
198
199 return true;
200}
201
202RSInfo::RSInfo(size_t pStringPoolSize) : mStringPool(NULL) {
203 ::memset(&mHeader, 0, sizeof(mHeader));
204
205 ::memcpy(mHeader.magic, RSINFO_MAGIC, sizeof(mHeader.magic));
206 ::memcpy(mHeader.version, RSINFO_VERSION, sizeof(mHeader.version));
207
208 mHeader.headerSize = sizeof(mHeader);
209
210 mHeader.dependencyTable.itemSize = sizeof(rsinfo::DependencyTableItem);
211 mHeader.pragmaList.itemSize = sizeof(rsinfo::PragmaItem);
212 mHeader.objectSlotList.itemSize = sizeof(rsinfo::ObjectSlotItem);
213 mHeader.exportVarNameList.itemSize = sizeof(rsinfo::ExportVarNameItem);
214 mHeader.exportFuncNameList.itemSize = sizeof(rsinfo::ExportFuncNameItem);
215 mHeader.exportForeachFuncList.itemSize = sizeof(rsinfo::ExportForeachFuncItem);
216
217 if (pStringPoolSize > 0) {
218 mHeader.strPoolSize = pStringPoolSize;
219 mStringPool = new (std::nothrow) char [ mHeader.strPoolSize ];
220 if (mStringPool == NULL) {
221 ALOGE("Out of memory when allocate memory for string pool in RSInfo "
222 "constructor (size: %u)!", mHeader.strPoolSize);
223 }
224 }
225}
226
227RSInfo::~RSInfo() {
228 delete [] mStringPool;
229}
230
231bool RSInfo::layout(off_t initial_offset) {
232 mHeader.dependencyTable.offset = initial_offset +
233 mHeader.headerSize +
234 mHeader.strPoolSize;
235 mHeader.dependencyTable.count = mDependencyTable.size();
236
237#define AFTER(_list) ((_list).offset + (_list).itemSize * (_list).count)
238 mHeader.pragmaList.offset = AFTER(mHeader.dependencyTable);
239 mHeader.pragmaList.count = mPragmas.size();
240
241 mHeader.objectSlotList.offset = AFTER(mHeader.pragmaList);
242 mHeader.objectSlotList.count = mObjectSlots.size();
243
244 mHeader.exportVarNameList.offset = AFTER(mHeader.objectSlotList);
245 mHeader.exportVarNameList.count = mExportVarNames.size();
246
247 mHeader.exportFuncNameList.offset = AFTER(mHeader.exportVarNameList);
248 mHeader.exportFuncNameList.count = mExportFuncNames.size();
249
250 mHeader.exportForeachFuncList.offset = AFTER(mHeader.exportFuncNameList);
251 mHeader.exportForeachFuncList.count = mExportForeachFuncs.size();
252#undef AFTER
253
254 return true;
255}
256
257void RSInfo::dump() const {
258 // Hide the codes to save the code size when debugging is disabled.
259#if !LOG_NDEBUG
260
261 // Dump header
262 ALOGV("RSInfo Header:");
263 ALOGV("\tIs threadable: %s", ((mHeader.isThreadable) ? "true" : "false"));
264 ALOGV("\tHeader size: %u", mHeader.headerSize);
265 ALOGV("\tString pool size: %u", mHeader.strPoolSize);
266
267#define DUMP_LIST_HEADER(_name, _header) do { \
268 ALOGV(_name ":"); \
269 ALOGV("\toffset: %u", (_header).offset); \
270 ALOGV("\t# of item: %u", (_header).count); \
271 ALOGV("\tsize of each item: %u", (_header).itemSize); \
272} while (false)
273 DUMP_LIST_HEADER("Dependency table", mHeader.dependencyTable);
274 for (DependencyTableTy::const_iterator dep_iter = mDependencyTable.begin(),
275 dep_end = mDependencyTable.end(); dep_iter != dep_end; dep_iter++) {
276 PRINT_DEPENDENCY("", dep_iter->first, dep_iter->second);
277 }
278
279 DUMP_LIST_HEADER("Pragma list", mHeader.pragmaList);
280 for (PragmaListTy::const_iterator pragma_iter = mPragmas.begin(),
281 pragma_end = mPragmas.end(); pragma_iter != pragma_end; pragma_iter++) {
282 ALOGV("\tkey: %s, value: %s", pragma_iter->first, pragma_iter->second);
283 }
284
285 DUMP_LIST_HEADER("RS object slots", mHeader.objectSlotList);
286 for (ObjectSlotListTy::const_iterator slot_iter = mObjectSlots.begin(),
287 slot_end = mObjectSlots.end(); slot_iter != slot_end; slot_iter++) {
288 ALOGV("slot: %u", *slot_iter);
289 }
290
291 DUMP_LIST_HEADER("RS export variables", mHeader.exportVarNameList);
292 for (ExportVarNameListTy::const_iterator var_iter = mExportVarNames.begin(),
293 var_end = mExportVarNames.end(); var_iter != var_end; var_iter++) {
294 ALOGV("name: %s", *var_iter);
295 }
296
297 DUMP_LIST_HEADER("RS export functions", mHeader.exportFuncNameList);
298 for (ExportFuncNameListTy::const_iterator func_iter = mExportFuncNames.begin(),
299 func_end = mExportFuncNames.end(); func_iter != func_end; func_iter++) {
300 ALOGV("name: %s", *func_iter);
301 }
302
303 DUMP_LIST_HEADER("RS foreach list", mHeader.exportForeachFuncList);
304 for (ExportForeachFuncListTy::const_iterator
305 foreach_iter = mExportForeachFuncs.begin(),
306 foreach_end = mExportForeachFuncs.end(); foreach_iter != foreach_end;
307 foreach_iter++) {
308 ALOGV("name: %s, signature: %05x", foreach_iter->first,
309 foreach_iter->second);
310 }
311#undef DUMP_LIST_HEADER
312
313#endif // LOG_NDEBUG
314 return;
315}
316
317const char *RSInfo::getStringFromPool(rsinfo::StringIndexTy pStrIdx) const {
318 // String pool uses direct indexing. Ensure that the pStrIdx is within the
319 // range.
320 if (pStrIdx >= mHeader.strPoolSize) {
321 ALOGE("String index #%u is out of range in string pool (size: %u)!",
322 pStrIdx, mHeader.strPoolSize);
323 return NULL;
324 }
325 return &mStringPool[ pStrIdx ];
326}
327
328rsinfo::StringIndexTy RSInfo::getStringIdxInPool(const char *pStr) const {
329 // Assume we are on the flat memory architecture (i.e., the memory space is
330 // continuous.)
331 if ((mStringPool + mHeader.strPoolSize) < pStr) {
332 ALOGE("String %s does not in the string pool!", pStr);
333 return rsinfo::gInvalidStringIndex;
334 }
335 return (pStr - mStringPool);
336}
337
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700338RSInfo::FloatPrecision RSInfo::getFloatPrecisionRequirement() const {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800339 // Check to see if we have any FP precision-related pragmas.
Stephen Hines688e4c02012-12-12 18:04:18 -0800340 std::string relaxed_pragma("rs_fp_relaxed");
341 std::string imprecise_pragma("rs_fp_imprecise");
342 std::string full_pragma("rs_fp_full");
Zonr Chang1e2adce2012-04-12 13:29:43 +0800343 bool relaxed_pragma_seen = false;
Stephen Hines688e4c02012-12-12 18:04:18 -0800344 bool imprecise_pragma_seen = false;
345 RSInfo::FloatPrecision result = FP_Full;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800346
347 for (PragmaListTy::const_iterator pragma_iter = mPragmas.begin(),
348 pragma_end = mPragmas.end(); pragma_iter != pragma_end;
349 pragma_iter++) {
350 const char *pragma_key = pragma_iter->first;
Stephen Hines688e4c02012-12-12 18:04:18 -0800351 if (!relaxed_pragma.compare(pragma_key)) {
352 if (relaxed_pragma_seen || imprecise_pragma_seen) {
353 ALOGE("Multiple float precision pragmas specified!");
Zonr Chang1e2adce2012-04-12 13:29:43 +0800354 }
Stephen Hines688e4c02012-12-12 18:04:18 -0800355 relaxed_pragma_seen = true;
356 } else if (!imprecise_pragma.compare(pragma_key)) {
357 if (relaxed_pragma_seen || imprecise_pragma_seen) {
358 ALOGE("Multiple float precision pragmas specified!");
359 }
360 imprecise_pragma_seen = true;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800361 }
362 }
363
364 // Imprecise is selected over Relaxed precision.
365 // In the absence of both, we stick to the default Full precision.
Stephen Hines688e4c02012-12-12 18:04:18 -0800366 if (imprecise_pragma_seen) {
367 result = FP_Imprecise;
368 } else if (relaxed_pragma_seen) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700369 result = FP_Relaxed;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800370 }
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700371
372 // Provide an override for precsion via adb shell setprop
373 // adb shell setprop debug.rs.precision rs_fp_full
374 // adb shell setprop debug.rs.precision rs_fp_relaxed
375 // adb shell setprop debug.rs.precision rs_fp_imprecise
376 char precision_prop_buf[PROPERTY_VALUE_MAX];
377 property_get("debug.rs.precision", precision_prop_buf, "");
378
379 if (precision_prop_buf[0]) {
Stephen Hines688e4c02012-12-12 18:04:18 -0800380 if (!relaxed_pragma.compare(precision_prop_buf)) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700381 ALOGI("Switching to RS FP relaxed mode via setprop");
382 result = FP_Relaxed;
Stephen Hines688e4c02012-12-12 18:04:18 -0800383 } else if (!imprecise_pragma.compare(precision_prop_buf)) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700384 ALOGI("Switching to RS FP imprecise mode via setprop");
385 result = FP_Imprecise;
Stephen Hines688e4c02012-12-12 18:04:18 -0800386 } else if (!full_pragma.compare(precision_prop_buf)) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700387 ALOGI("Switching to RS FP full mode via setprop");
388 result = FP_Full;
389 }
390 }
391
392 return result;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800393}