diff options
author | Roland Levillain <rpl@google.com> | 2015-04-14 16:34:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-14 16:34:45 +0000 |
commit | 8d20011a9de7cd94bee59db3ae8c0cbbf55911d9 (patch) | |
tree | e8f0656ae879c27175c7287086ee8fd70c24b93a /runtime/arch | |
parent | 85806723695120d183e85e9d12d52340b839b781 (diff) | |
parent | 760d8efd535764e54500bf65a944ed3f2a54c123 (diff) | |
download | art-8d20011a9de7cd94bee59db3ae8c0cbbf55911d9.tar.gz art-8d20011a9de7cd94bee59db3ae8c0cbbf55911d9.tar.bz2 art-8d20011a9de7cd94bee59db3ae8c0cbbf55911d9.zip |
Merge "Opt Compiler: ARM64 goodness"
Diffstat (limited to 'runtime/arch')
-rw-r--r-- | runtime/arch/arm64/instruction_set_features_arm64.h | 11 | ||||
-rw-r--r-- | runtime/arch/arm64/instruction_set_features_arm64_test.cc | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/runtime/arch/arm64/instruction_set_features_arm64.h b/runtime/arch/arm64/instruction_set_features_arm64.h index 3b3e2c95fe..e59ff58954 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64.h +++ b/runtime/arch/arm64/instruction_set_features_arm64.h @@ -66,13 +66,12 @@ class Arm64InstructionSetFeatures FINAL : public InstructionSetFeatures { return fix_cortex_a53_843419_; } - // TODO: Tune this on a per CPU basis. For now, we pessimistically assume - // that all ARM64 CPUs prefer explicit memory barriers over acquire-release. - // - // NOTE: This should not be the case! However we want to exercise the - // explicit memory barriers code paths in the Optimizing Compiler. + // NOTE: This flag can be tunned on a CPU basis. In general all ARMv8 CPUs + // should prefer the Acquire-Release semantics over the explicit DMBs when + // handling load/store-volatile. For a specific use case see the ARM64 + // Optimizing backend. bool PreferAcquireRelease() const { - return false; + return true; } virtual ~Arm64InstructionSetFeatures() {} diff --git a/runtime/arch/arm64/instruction_set_features_arm64_test.cc b/runtime/arch/arm64/instruction_set_features_arm64_test.cc index 753107baa8..599f24ed30 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64_test.cc +++ b/runtime/arch/arm64/instruction_set_features_arm64_test.cc @@ -31,7 +31,7 @@ TEST(Arm64InstructionSetFeaturesTest, Arm64Features) { EXPECT_STREQ("smp,a53", arm64_features->GetFeatureString().c_str()); EXPECT_EQ(arm64_features->AsBitmap(), 3U); // See the comments in instruction_set_features_arm64.h. - EXPECT_FALSE(arm64_features->AsArm64InstructionSetFeatures()->PreferAcquireRelease()); + EXPECT_TRUE(arm64_features->AsArm64InstructionSetFeatures()->PreferAcquireRelease()); } } // namespace art |