summaryrefslogtreecommitdiffstats
path: root/vm/InlineNative.h
diff options
context:
space:
mode:
authorXin Qi <xqi@codeaurora.org>2011-11-27 23:27:29 -0800
committerLinux Build Service Account <lnxbuild@localhost>2013-10-31 19:37:29 -0600
commit337a595d746d34ade52e3aba2c739455dfd3cf57 (patch)
tree9e7c1286bc68b26dd445603118132e359ec28e58 /vm/InlineNative.h
parent6e21232cf2bca0e73bd418413564cb140ab9ccbd (diff)
downloadandroid_dalvik-337a595d746d34ade52e3aba2c739455dfd3cf57.tar.gz
android_dalvik-337a595d746d34ade52e3aba2c739455dfd3cf57.tar.bz2
android_dalvik-337a595d746d34ade52e3aba2c739455dfd3cf57.zip
dalvik: dalvik device extension pack.
Add support for customer device extension Change-Id: I0402a630ba212d1c5e81cda110f61210f7b60384 (cherry picked from commit 11499df326462bfe25890a35c6abbf019ff7784e) (cherry picked from commit e03b8f8da9cf4eef64cedf39ce9ca90d26ce5124) (cherry picked from commit fb360be406f35b9591f12c61936657f03cc5880f)
Diffstat (limited to 'vm/InlineNative.h')
-rw-r--r--vm/InlineNative.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/vm/InlineNative.h b/vm/InlineNative.h
index fe14f8bf8..5d3dd13ec 100644
--- a/vm/InlineNative.h
+++ b/vm/InlineNative.h
@@ -33,6 +33,12 @@ Method* dvmFindInlinableMethod(const char* classDescriptor,
typedef bool (*InlineOp4Func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
JValue* pResult);
+#ifdef INLINE_ARG_EXPANDED
+typedef bool (*InlineOp5Func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
+ JValue* pResult, u4 arg4);
+typedef bool (*InlineOp7Func)(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
+ JValue* pResult, u4 arg4, u4 arg5, u4 arg6);
+#endif
/*
* Table of inline operations.
*
@@ -117,12 +123,45 @@ INLINE bool dvmPerformInlineOp4Std(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
return (*gDvmInlineOpsTable[opIndex].func)(arg0, arg1, arg2, arg3, pResult);
}
+#ifdef INLINE_ARG_EXPANDED
+/*
+ * Perform the operation specified by "opIndex".
+ *
+ * We want the arguments to appear in the first 4 registers so they can
+ * be passed straight through to the handler function. Ideally on ARM
+ * they'll go into r0-r3 and stay there.
+ *
+ * Returns "true" if everything went normally, "false" if an exception
+ * was thrown.
+ */
+INLINE bool dvmPerformInlineOp5Std(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
+ JValue* pResult, int opIndex, u4 arg4)
+{
+ return ((InlineOp5Func)(*gDvmInlineOpsTable[opIndex].func))(arg0, arg1, arg2, arg3, pResult, arg4);
+}
+
+INLINE bool dvmPerformInlineOp7Std(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
+ JValue* pResult, int opIndex, u4 arg4, u4 arg5, u4 arg6)
+{
+ return ((InlineOp7Func)(*gDvmInlineOpsTable[opIndex].func))(arg0, arg1, arg2, arg3, pResult, arg4, arg5, arg6);
+}
+
+#endif
/*
* Like the "std" version, but will emit profiling info.
*/
bool dvmPerformInlineOp4Dbg(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
JValue* pResult, int opIndex);
+#ifdef INLINE_ARG_EXPANDED
+/*
+ * Like the "std" version, but will emit profiling info.
+ */
+bool dvmPerformInlineOp5Dbg(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
+ JValue* pResult, int opIndex, u4 arg4);
+bool dvmPerformInlineOp7Dbg(u4 arg0, u4 arg1, u4 arg2, u4 arg3,
+ JValue* pResult, int opIndex, u4 arg4, u4 arg5, u4 arg6);
+#endif
/*
* Return method & populate the table on first use.
*/