From 5e142fb1383bf0bdfd58df36ca72a63c733e6710 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 30 Oct 2023 14:52:58 +0100 Subject: 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 --- compiler/optimizing/optimizing_cfi_test.cc | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'compiler/optimizing/optimizing_cfi_test.cc') 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 expected_asm( - expected_asm_kArm64, - expected_asm_kArm64 + arraysize(expected_asm_kArm64)); - std::vector 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 -- cgit v1.2.3-59-g8ed1b