Use quick generic JNI calls based on compiler driver options.

Change-Id: Ic70f4b9b5759eb11b35677c0039fb00eb1c4c506
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index bdf31ce..c2b6f5a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1869,12 +1869,14 @@
   uint64_t start_ns = NanoTime();
 
   if ((access_flags & kAccNative) != 0) {
-#if defined(__x86_64__)
-    // leaving this empty will trigger the generic JNI version
-#else
-    compiled_method = compiler_->JniCompile(*this, access_flags, method_idx, dex_file);
-    CHECK(compiled_method != NULL);
-#endif
+    // Are we only interpreting only and have support for generic JNI down calls?
+    if ((compiler_options_->GetCompilerFilter() == CompilerOptions::kInterpretOnly) &&
+        (instruction_set_ == kX86_64)) {
+      // Leaving this empty will trigger the generic JNI version
+    } else {
+      compiled_method = compiler_->JniCompile(*this, access_flags, method_idx, dex_file);
+      CHECK(compiled_method != NULL);
+    }
   } else if ((access_flags & kAccAbstract) != 0) {
   } else {
     MethodReference method_ref(&dex_file, method_idx);