summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2023-10-30 14:52:58 +0100
committer VladimĂ­r Marko <vmarko@google.com> 2023-11-02 07:57:47 +0000
commit5e142fb1383bf0bdfd58df36ca72a63c733e6710 (patch)
treeba932cf9f45b15b7c60545f3a8fe8e262ff5091c /compiler/optimizing
parent5e95eec2d32c790d1ecc16e3d6eebf361d6efeb5 (diff)
Clean up `gUseReadBarrier` uses in JNI compiler.
Also clean up `gUseReadBarrier` uses in dex2oat/ and move some host tests to `art_compiler_host_tests`. Test: m test-art-host-gtest Bug: 289805127 Change-Id: I0909480d3346a611e4b1dd066d7484a9656ec890
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/optimizing_cfi_test.cc24
1 files changed, 4 insertions, 20 deletions
diff --git a/compiler/optimizing/optimizing_cfi_test.cc b/compiler/optimizing/optimizing_cfi_test.cc
index 632c32a70b..9df4932f3c 100644
--- a/compiler/optimizing/optimizing_cfi_test.cc
+++ b/compiler/optimizing/optimizing_cfi_test.cc
@@ -35,9 +35,6 @@ namespace vixl32 = vixl::aarch32;
namespace art HIDDEN {
-// Run the tests only on host.
-#ifndef ART_TARGET_ANDROID
-
class OptimizingCFITest : public CFITest, public OptimizingUnitTestHelper {
public:
// Enable this flag to generate the expected outputs.
@@ -144,26 +141,15 @@ TEST_ISA(kThumb2)
#endif
#ifdef ART_ENABLE_CODEGEN_arm64
-// Run the tests for ARM64 only with Baker read barriers, as the
+// Run the tests for ARM64 only if the Marking Register is reserved as the
// expected generated code saves and restore X21 and X22 (instead of
// X20 and X21), as X20 is used as Marking Register in the Baker read
// barrier configuration, and as such is removed from the set of
// callee-save registers in the ARM64 code generator of the Optimizing
// compiler.
-//
-// We can't use compile-time macros for read-barrier as the introduction
-// of userfaultfd-GC has made it a runtime choice.
-TEST_F(OptimizingCFITest, kArm64) {
- if (kUseBakerReadBarrier && gUseReadBarrier) {
- std::vector<uint8_t> expected_asm(
- expected_asm_kArm64,
- expected_asm_kArm64 + arraysize(expected_asm_kArm64));
- std::vector<uint8_t> expected_cfi(
- expected_cfi_kArm64,
- expected_cfi_kArm64 + arraysize(expected_cfi_kArm64));
- TestImpl(InstructionSet::kArm64, "kArm64", expected_asm, expected_cfi);
- }
-}
+#if defined(RESERVE_MARKING_REGISTER)
+TEST_ISA(kArm64)
+#endif
#endif
#ifdef ART_ENABLE_CODEGEN_x86
@@ -199,6 +185,4 @@ TEST_F(OptimizingCFITest, kThumb2Adjust) {
}
#endif
-#endif // ART_TARGET_ANDROID
-
} // namespace art