From 936b37f3a7f224d990a36b2ec66782a4462180d6 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Fri, 14 Feb 2014 00:52:24 -0800 Subject: Upcall support for x86-64. Sufficient to pass jni_internal_test. Change-Id: Ia0d9b8241ab8450e04765b9c32eb6dc8fc1a8733 --- runtime/runtime.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/runtime.cc') diff --git a/runtime/runtime.cc b/runtime/runtime.cc index e66e5af..3ccea36 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1486,12 +1486,18 @@ mirror::ArtMethod* Runtime::CreateCalleeSaveMethod(InstructionSet instruction_se (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 + (1 << art::x86_64::kNumberOfCpuRegisters); // fake return address callee save + uint32_t fp_arg_spills = + (1 << art::x86_64::XMM0) | (1 << art::x86_64::XMM1) | (1 << art::x86_64::XMM2) | + (1 << art::x86_64::XMM3) | (1 << art::x86_64::XMM4) | (1 << art::x86_64::XMM5) | + (1 << art::x86_64::XMM6) | (1 << art::x86_64::XMM7); + uint32_t fp_spills = (type == kRefsAndArgs ? fp_arg_spills : 0); size_t frame_size = RoundUp((__builtin_popcount(core_spills) /* gprs */ + + __builtin_popcount(fp_spills) /* fprs */ + 1 /* Method* */) * kPointerSize, kStackAlignment); method->SetFrameSizeInBytes(frame_size); method->SetCoreSpillMask(core_spills); - method->SetFpSpillMask(0); + method->SetFpSpillMask(fp_spills); } else { UNIMPLEMENTED(FATAL) << instruction_set; } -- cgit v1.1