summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/dex_file_method_inliner.cc
diff options
context:
space:
mode:
authorYixin Shou <yixin.shou@intel.com>2014-02-07 05:09:30 -0800
committerYixin Shou <yixin.shou@intel.com>2014-02-07 10:08:44 -0800
commitdbb17e378b538133750e56375bbdbb217db7b248 (patch)
tree59b7ae146e75809532fdbd43b4ef177be310b772 /compiler/dex/quick/dex_file_method_inliner.cc
parent90ea00c30f5dd1a7c2934417ac5ec7d116ceb93d (diff)
downloadart-dbb17e378b538133750e56375bbdbb217db7b248.tar.gz
art-dbb17e378b538133750e56375bbdbb217db7b248.tar.bz2
art-dbb17e378b538133750e56375bbdbb217db7b248.zip
Added inlined abs method with float and double type
This patch added the implementation for inlining java.lang.Math.abs() method with float and double type. Change-Id: Ic99471b4ab4176e4a0153bef383bb49944fb636f Signed-off-by: Yixin Shou <yixin.shou@intel.com>
Diffstat (limited to 'compiler/dex/quick/dex_file_method_inliner.cc')
-rw-r--r--compiler/dex/quick/dex_file_method_inliner.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/dex/quick/dex_file_method_inliner.cc b/compiler/dex/quick/dex_file_method_inliner.cc
index 0937be3232..4c79c3a6e4 100644
--- a/compiler/dex/quick/dex_file_method_inliner.cc
+++ b/compiler/dex/quick/dex_file_method_inliner.cc
@@ -107,6 +107,8 @@ const DexFileMethodInliner::ProtoDef DexFileMethodInliner::kProtoCacheDefs[] = {
{ kClassCacheShort, 1, { kClassCacheShort } },
// kProtoCacheD_D
{ kClassCacheDouble, 1, { kClassCacheDouble } },
+ // kProtoCacheF_F
+ { kClassCacheFloat, 1, { kClassCacheFloat } },
// kProtoCacheD_J
{ kClassCacheLong, 1, { kClassCacheDouble } },
// kProtoCacheJ_D
@@ -182,6 +184,10 @@ const DexFileMethodInliner::IntrinsicDef DexFileMethodInliner::kIntrinsicMethods
INTRINSIC(JavaLangStrictMath, Abs, I_I, kIntrinsicAbsInt, 0),
INTRINSIC(JavaLangMath, Abs, J_J, kIntrinsicAbsLong, 0),
INTRINSIC(JavaLangStrictMath, Abs, J_J, kIntrinsicAbsLong, 0),
+ INTRINSIC(JavaLangMath, Abs, F_F, kIntrinsicAbsFloat, 0),
+ INTRINSIC(JavaLangStrictMath, Abs, F_F, kIntrinsicAbsFloat, 0),
+ INTRINSIC(JavaLangMath, Abs, D_D, kIntrinsicAbsDouble, 0),
+ INTRINSIC(JavaLangStrictMath, Abs, D_D, kIntrinsicAbsDouble, 0),
INTRINSIC(JavaLangMath, Min, II_I, kIntrinsicMinMaxInt, kIntrinsicFlagMin),
INTRINSIC(JavaLangStrictMath, Min, II_I, kIntrinsicMinMaxInt, kIntrinsicFlagMin),
INTRINSIC(JavaLangMath, Max, II_I, kIntrinsicMinMaxInt, kIntrinsicFlagMax),
@@ -328,6 +334,10 @@ bool DexFileMethodInliner::GenIntrinsic(Mir2Lir* backend, CallInfo* info) {
return backend->GenInlinedAbsInt(info);
case kIntrinsicAbsLong:
return backend->GenInlinedAbsLong(info);
+ case kIntrinsicAbsFloat:
+ return backend->GenInlinedAbsFloat(info);
+ case kIntrinsicAbsDouble:
+ return backend->GenInlinedAbsDouble(info);
case kIntrinsicMinMaxInt:
return backend->GenInlinedMinMaxInt(info, intrinsic.data & kIntrinsicFlagMin);
case kIntrinsicSqrt: