Generic JNI implementation for x86_64
Starting implementation for generic JNI on x86_64. Frames are of
large static size (>4K) right now, should be compacted later. Passes
the whole of jni_compiler_test.
Change-Id: I88ac3e13a534afe7568d62a1ef97cb766e8260e4
diff --git a/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc
index f48cf6c..a9fbc64 100644
--- a/compiler/jni/jni_compiler_test.cc
+++ b/compiler/jni/jni_compiler_test.cc
@@ -328,7 +328,9 @@
EXPECT_TRUE(env->IsInstanceOf(thisObj, JniCompilerTest::jklass_));
gJava_MyClassNatives_fooIOO_calls++;
ScopedObjectAccess soa(Thread::Current());
- EXPECT_EQ(3U, Thread::Current()->NumStackReferences());
+ size_t null_args = (y == nullptr ? 1 : 0) + (z == nullptr ? 1 : 0);
+ EXPECT_TRUE(3U == Thread::Current()->NumStackReferences() ||
+ (3U - null_args) == Thread::Current()->NumStackReferences());
switch (x) {
case 1:
return y;
@@ -434,7 +436,9 @@
EXPECT_TRUE(env->IsInstanceOf(JniCompilerTest::jobj_, klass));
gJava_MyClassNatives_fooSIOO_calls++;
ScopedObjectAccess soa(Thread::Current());
- EXPECT_EQ(3U, Thread::Current()->NumStackReferences());
+ size_t null_args = (y == nullptr ? 1 : 0) + (z == nullptr ? 1 : 0);
+ EXPECT_TRUE(3U == Thread::Current()->NumStackReferences() ||
+ (3U - null_args) == Thread::Current()->NumStackReferences());
switch (x) {
case 1:
return y;
@@ -487,7 +491,9 @@
EXPECT_TRUE(env->IsInstanceOf(JniCompilerTest::jobj_, klass));
gJava_MyClassNatives_fooSSIOO_calls++;
ScopedObjectAccess soa(Thread::Current());
- EXPECT_EQ(3U, Thread::Current()->NumStackReferences());
+ size_t null_args = (y == nullptr ? 1 : 0) + (z == nullptr ? 1 : 0);
+ EXPECT_TRUE(3U == Thread::Current()->NumStackReferences() ||
+ (3U - null_args) == Thread::Current()->NumStackReferences());
switch (x) {
case 1:
return y;