A few 64bit fixes.

Change-Id: I1fe189d638b9cb5127b897da6cecdad6902db930
diff --git a/runtime/arch/x86_64/quick_entrypoints_x86_64.S b/runtime/arch/x86_64/quick_entrypoints_x86_64.S
index 81d5f4c..ca3516e 100644
--- a/runtime/arch/x86_64/quick_entrypoints_x86_64.S
+++ b/runtime/arch/x86_64/quick_entrypoints_x86_64.S
@@ -421,7 +421,7 @@
 .Lreturn_float_quick2:
     movss %xmm0, (%r8)           // Store the floating point result.
     ret
-END_FUNCTION art_quick_invoke_stub
+END_FUNCTION art_quick_invoke_static_stub
 
 MACRO3(NO_ARG_DOWNCALL, c_name, cxx_name, return_macro)
     DEFINE_FUNCTION VAR(c_name, 0)
@@ -659,6 +659,7 @@
     movq %rsp, %rcx
     call PLT_SYMBOL(artQuickResolutionTrampoline) // (called, receiver, Thread*, SP)
     movq %rax, %r10               // Remember returned code pointer in R10.
+    movq (%rsp), %rdi             // Load called method into RDI.
     RESTORE_REF_AND_ARGS_CALLEE_SAVE_FRAME
     testq %r10, %r10              // If code pointer is NULL goto deliver pending exception.
     jz 1f
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 6255c8c..b709da3 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1597,7 +1597,10 @@
   }
   const void* result = GetOatMethodFor(method).GetQuickCode();
   if (result == nullptr) {
-    if (method->IsPortableCompiled()) {
+    if (method->IsNative()) {
+      // No code and native? Use generic trampoline.
+      result = GetQuickGenericJniTrampoline();
+    } else if (method->IsPortableCompiled()) {
       // No code? Do we expect portable code?
       result = GetQuickToPortableBridge();
     } else {
@@ -1707,12 +1710,12 @@
     bool have_portable_code = false;
     if (enter_interpreter) {
       // Use interpreter entry point.
-
-      // check whether the method is native, in which case it's generic JNI
-      portable_code = GetPortableToInterpreterBridge();
+      // Check whether the method is native, in which case it's generic JNI.
       if (quick_code == nullptr && portable_code == nullptr && method->IsNative()) {
         quick_code = GetQuickGenericJniTrampoline();
+        portable_code = GetPortableToQuickBridge();
       } else {
+        portable_code = GetPortableToInterpreterBridge();
         quick_code = GetQuickToInterpreterBridge();
       }
     } else {
diff --git a/runtime/elf_file.cc b/runtime/elf_file.cc
index fe33806..4de46e3 100644
--- a/runtime/elf_file.cc
+++ b/runtime/elf_file.cc
@@ -978,7 +978,11 @@
       !check_section_name(all, 11, ".debug_str")) {
     return;
   }
-
+#ifdef __LP64__
+  if (true) {
+    return;  // No ELF debug support in 64bit.
+  }
+#endif
   // This is not needed if we have no .text segment.
   uint32_t text_start_addr = 0;
   for (uint32_t i = 0; i < segments_.size(); i++) {