Default to 64-bit for tests of methods with varying ISAs for valgrind.
The size of the created methods will technically not be correct, but
they will be larger than necessary when the target is changed to 32-bit,
so valgrind will not complain.
Bug: 19368740
Change-Id: Ic78867b4700248ec6d70f5d7f6d87ce9447ac448
diff --git a/runtime/arch/arch_test.cc b/runtime/arch/arch_test.cc
index ab6b00b..5733ab6 100644
--- a/runtime/arch/arch_test.cc
+++ b/runtime/arch/arch_test.cc
@@ -24,6 +24,12 @@
class ArchTest : public CommonRuntimeTest {
protected:
+ void SetUpRuntimeOptions(RuntimeOptions *options) OVERRIDE {
+ // Use 64-bit ISA for runtime setup to make method size potentially larger
+ // than necessary (rather than smaller) during CreateCalleeSaveMethod
+ options->push_back(std::make_pair("imageinstructionset", "x86_64"));
+ }
+
static void CheckFrameSize(InstructionSet isa, Runtime::CalleeSaveType type, uint32_t save_size)
NO_THREAD_SAFETY_ANALYSIS {
Runtime* r = Runtime::Current();
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc
index 85a0b99..01c17ac 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc
@@ -25,6 +25,12 @@
class QuickTrampolineEntrypointsTest : public CommonRuntimeTest {
protected:
+ void SetUpRuntimeOptions(RuntimeOptions *options) OVERRIDE {
+ // Use 64-bit ISA for runtime setup to make method size potentially larger
+ // than necessary (rather than smaller) during CreateCalleeSaveMethod
+ options->push_back(std::make_pair("imageinstructionset", "x86_64"));
+ }
+
static mirror::ArtMethod* CreateCalleeSaveMethod(InstructionSet isa,
Runtime::CalleeSaveType type)
NO_THREAD_SAFETY_ANALYSIS {