diff options
| author | 2014-03-12 22:20:00 +0000 | |
|---|---|---|
| committer | 2014-03-12 22:20:01 +0000 | |
| commit | e78a4234cd78210f738d0c8ff1452f4955b31a87 (patch) | |
| tree | 394cc0066c61c37f680d3622095fd10e542fca15 /compiler/common_compiler_test.h | |
| parent | 12bea5797758382ca0737c84ff6c941cd270d934 (diff) | |
| parent | 36fea8dd490ab6439f391b8cd7f366c59f026fd2 (diff) | |
Merge "Fixing structure of native frame for Generic JNI"
Diffstat (limited to 'compiler/common_compiler_test.h')
| -rw-r--r-- | compiler/common_compiler_test.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h index def7b681dc..d28b0fedac 100644 --- a/compiler/common_compiler_test.h +++ b/compiler/common_compiler_test.h @@ -219,8 +219,15 @@ class CommonCompilerTest : public CommonRuntimeTest { } else { const void* method_code = GetQuickGenericJniTrampoline(); mirror::ArtMethod* callee_save_method = runtime_->GetCalleeSaveMethod(Runtime::kRefsAndArgs); + + // Compute Sirt size, as Sirt goes into frame + MethodHelper mh(method); + uint32_t sirt_refs = mh.GetNumberOfReferenceArgsWithoutReceiver() + 1; + uint32_t sirt_size = StackIndirectReferenceTable::SizeOf(sirt_refs); + OatFile::OatMethod oat_method = CreateOatMethod(method_code, - callee_save_method->GetFrameSizeInBytes(), + callee_save_method->GetFrameSizeInBytes() + + sirt_size, callee_save_method->GetCoreSpillMask(), callee_save_method->GetFpSpillMask(), nullptr, |