summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-02-14 00:52:24 -0800
committerIan Rogers <irogers@google.com>2014-02-20 14:46:02 -0800
commit936b37f3a7f224d990a36b2ec66782a4462180d6 (patch)
tree94de34072e8ce0a2a251ed8d5ccc7d87709db750 /runtime/runtime.cc
parentfd80b5717c0cdd10ef2caabf4291415a52fcc874 (diff)
downloadart-936b37f3a7f224d990a36b2ec66782a4462180d6.zip
art-936b37f3a7f224d990a36b2ec66782a4462180d6.tar.gz
art-936b37f3a7f224d990a36b2ec66782a4462180d6.tar.bz2
Upcall support for x86-64.
Sufficient to pass jni_internal_test. Change-Id: Ia0d9b8241ab8450e04765b9c32eb6dc8fc1a8733
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc10
1 files changed, 8 insertions, 2 deletions
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;
}