summaryrefslogtreecommitdiff
path: root/compiler/common_compiler_test.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-03-12 22:20:00 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-03-12 22:20:01 +0000
commite78a4234cd78210f738d0c8ff1452f4955b31a87 (patch)
tree394cc0066c61c37f680d3622095fd10e542fca15 /compiler/common_compiler_test.h
parent12bea5797758382ca0737c84ff6c941cd270d934 (diff)
parent36fea8dd490ab6439f391b8cd7f366c59f026fd2 (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.h9
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,