diff options
author | Xueliang Zhong <xueliang.zhong@linaro.org> | 2020-07-16 13:59:24 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-16 13:59:24 +0000 |
commit | 17877cf59d81bf46ff0564d178b8f529421d9b12 (patch) | |
tree | 07f7202622272dee75fa6db8757ae23302cb215e /compiler/optimizing/codegen_test_utils.h | |
parent | 9398de86ab7312e1298785e8647be84a6c0bfef9 (diff) | |
parent | 32bdac8ddf8b0de036cda8cb5ecd3a9f2416cfcb (diff) |
VIXL simulator for ART (Stage1) am: 48ca6a681e am: 32bdac8ddf
Original change: https://android-review.googlesource.com/c/platform/art/+/1177334
Change-Id: I23285b9fd082fdce2f795a731e6befc9f8b6e98f
Diffstat (limited to 'compiler/optimizing/codegen_test_utils.h')
-rw-r--r-- | compiler/optimizing/codegen_test_utils.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h index 9d15f1f2940..f873e7514ed 100644 --- a/compiler/optimizing/codegen_test_utils.h +++ b/compiler/optimizing/codegen_test_utils.h @@ -223,12 +223,15 @@ static void VerifyGeneratedCode(InstructionSet target_isa, Expected expected) { ASSERT_TRUE(CanExecute(target_isa)) << "Target isa is not executable."; - // Verify on simulator. - CodeSimulatorContainer simulator(target_isa); - if (simulator.CanSimulate()) { - Expected result = SimulatorExecute<Expected>(simulator.Get(), f); - if (has_result) { - ASSERT_EQ(expected, result); + // Simulator cannot run without runtime, because it needs quick entrypoints. + if (Runtime::Current() != nullptr) { + // Verify on simulator. + CodeSimulatorContainer simulator(target_isa); + if (simulator.CanSimulate()) { + Expected result = SimulatorExecute<Expected>(simulator.Get(), f); + if (has_result) { + ASSERT_EQ(expected, result); + } } } |