From 0177e53ea521ad58b70c305700dab32f1ac773b7 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 11 Feb 2014 16:30:46 -0800 Subject: Work in the direction of hard float quick ABIs. Pass a shorty to ArtMethod::Invoke so that register setup can use it. Document x86-64 ABI. Add extra debug output for one JNI native method registration fails, namely a dump of the Class and its dex file's location. Add hack to get testing of OatMethod's without GC maps working in 64bit. Change-Id: Ic06b68e18eac33637df2caf5e7e775ff95ae70f3 --- runtime/runtime.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'runtime/runtime.cc') diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 09d05d1..4f3437f 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -807,7 +807,7 @@ jobject CreateSystemClassLoader() { JValue result; ArgArray arg_array(nullptr, 0); - InvokeWithArgArray(soa, getSystemClassLoader, &arg_array, &result, 'L'); + InvokeWithArgArray(soa, getSystemClassLoader, &arg_array, &result, "L"); SirtRef class_loader(soa.Self(), down_cast(result.GetL())); CHECK(class_loader.get() != nullptr); @@ -1473,12 +1473,11 @@ mirror::ArtMethod* Runtime::CreateCalleeSaveMethod(InstructionSet instruction_se method->SetFpSpillMask(0); } else if (instruction_set == kX86_64) { uint32_t ref_spills = - (1 << art::x86_64::RBP) | (1 << art::x86_64::RSI) | (1 << art::x86_64::RDI) | - (1 << art::x86_64::R8) | (1 << art::x86_64::R9) | (1 << art::x86_64::R10) | - (1 << art::x86_64::R11) | (1 << art::x86_64::R12) | (1 << art::x86_64::R13) | - (1 << art::x86_64::R14) | (1 << art::x86_64::R15); + (1 << art::x86_64::RBX) | (1 << art::x86_64::RBP) | (1 << art::x86_64::R12) | + (1 << art::x86_64::R13) | (1 << art::x86_64::R14) | (1 << art::x86_64::R15); uint32_t arg_spills = - (1 << art::x86_64::RCX) | (1 << art::x86_64::RDX) | (1 << art::x86_64::RBX); + (1 << art::x86_64::RSI) | (1 << art::x86_64::RDX) | (1 << art::x86_64::RCX) | + (1 << art::x86_64::R8) | (1 << art::x86_64::R9); uint32_t core_spills = ref_spills | (type == kRefsAndArgs ? arg_spills : 0) | (1 << art::x86::kNumberOfCpuRegisters); // fake return address callee save size_t frame_size = RoundUp((__builtin_popcount(core_spills) /* gprs */ + -- cgit v1.1