Skip to content

Commit

Permalink
Review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Dec 3, 2024
1 parent bb43ec8 commit 4dd4077
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/hotspot/gtest/riscv/test_assembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class WeakCmpxchgTester {
};

template <typename TESTSIZE, Assembler::operand_size ASMSIZE>
void run_narrow_cmpxchg_tests() {
void run_weak_cmpxchg_narrow_value_tests() {
// Assume natural aligned
TESTSIZE data[8];
TESTSIZE ret;
Expand All @@ -327,31 +327,31 @@ void run_narrow_cmpxchg_tests() {
TEST_VM(RiscV, cmpxchg_weak_int16_lr_sc) {
bool zacas = UseZacas;
UseZacas = false;
run_narrow_cmpxchg_tests<int16_t, Assembler::int16>();
run_weak_cmpxchg_narrow_value_tests<int16_t, Assembler::int16>();
UseZacas = zacas;
}

TEST_VM(RiscV, cmpxchg_weak_int8_lr_sc) {
bool zacas = UseZacas;
UseZacas = false;
run_narrow_cmpxchg_tests<int8_t, Assembler::int8>();
run_weak_cmpxchg_narrow_value_tests<int8_t, Assembler::int8>();
UseZacas = zacas;
}

TEST_VM(RiscV, cmpxchg_weak_int16_maybe_zacas) {
if (UseZacas) {
run_narrow_cmpxchg_tests<int16_t, Assembler::int16>();
run_weak_cmpxchg_narrow_value_tests<int16_t, Assembler::int16>();
}
}

TEST_VM(RiscV, cmpxchg_weak_int8_maybe_zacas) {
if (UseZacas) {
run_narrow_cmpxchg_tests<int8_t, Assembler::int8>();
run_weak_cmpxchg_narrow_value_tests<int8_t, Assembler::int8>();
}
}

template <typename TESTSIZE, Assembler::operand_size ASMSIZE>
void weak_cmpxchg_test() {
void run_weak_cmpxchg_tests() {
TESTSIZE data = 121;
TESTSIZE ret = WeakCmpxchgTester<TESTSIZE, ASMSIZE>::weak_cmpxchg((intptr_t)&data, 121, 42);
ASSERT_EQ(ret, 1);
Expand All @@ -366,26 +366,26 @@ void weak_cmpxchg_test() {
TEST_VM(RiscV, cmpxchg_weak_int64_lr_sc) {
bool zacas = UseZacas;
UseZacas = false;
weak_cmpxchg_test<int64_t, Assembler::int64>();
run_weak_cmpxchg_tests<int64_t, Assembler::int64>();
UseZacas = zacas;
}

TEST_VM(RiscV, cmpxchg_weak_int64_maybe_zacas) {
if (UseZacas) {
weak_cmpxchg_test<int64_t, Assembler::int64>();
run_weak_cmpxchg_tests<int64_t, Assembler::int64>();
}
}

TEST_VM(RiscV, cmpxchg_weak_int32_lr_sc) {
bool zacas = UseZacas;
UseZacas = false;
weak_cmpxchg_test<int32_t, Assembler::int32>();
run_weak_cmpxchg_tests<int32_t, Assembler::int32>();
UseZacas = zacas;
}

TEST_VM(RiscV, cmpxchg_weak_int32_maybe_zacas) {
if (UseZacas) {
weak_cmpxchg_test<int32_t, Assembler::int32>();
run_weak_cmpxchg_tests<int32_t, Assembler::int32>();
}
}

Expand Down

0 comments on commit 4dd4077

Please sign in to comment.