From bae77c79fdafcee4d1ba6a116e44c94a8eef0618 Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Tue, 28 May 2024 16:23:45 -0700 Subject: [PATCH] Fix lock_xchg* test to return 1 on failure Signed-off-by: Alan Jowett --- tests/lock_xchg.data | 5 +---- tests/lock_xchg32.data | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/lock_xchg.data b/tests/lock_xchg.data index de921ef..ff029ba 100644 --- a/tests/lock_xchg.data +++ b/tests/lock_xchg.data @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation # SPDX-License-Identifier: MIT -- asm -mov %r0, 0 +mov %r0, 1 # Write 0x1111111111111111 to [%r10-8] lddw %r1, 0x1111111111111111 stxdw [%r10-8], %r1 @@ -10,9 +10,6 @@ lddw %r1, 0x2222222222222222 # After the exchange, %r1 should contain 0x1111111111111111 and # [%r10-8] should contain 0x2222222222222222 lock xchg [%r10-8], %r1 -# Check that the old value is stored in %r0 -lddw %r2, 0x1111111111111111 -jne %r2, %r0, exit # Check that [%r10-8] contains 0x2222222222222222 ldxdw %r2, [%r10-8] lddw %r0, 0x2222222222222222 diff --git a/tests/lock_xchg32.data b/tests/lock_xchg32.data index 1665f08..48d1299 100644 --- a/tests/lock_xchg32.data +++ b/tests/lock_xchg32.data @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation # SPDX-License-Identifier: MIT -- asm -mov %r0, 0 +mov %r0, 1 # Write 0x1111111111111111 to [%r10-8] lddw %r1, 0x1111111111111111 stxdw [%r10-8], %r1 @@ -10,9 +10,6 @@ lddw %r1, 0x2222222222222222 # After the exchange, %r1 should contain 0x11111111 and # [%r10-8] should contain 0x1111111122222222 lock xchg32 [%r10-8], %r1 -# Check that the old value is stored in %r0 -lddw %r2, 0x11111111 -jne %r2, %r0, exit # Check that [%r10-8] contains 0x1111111122222222 ldxdw %r2, [%r10-8] lddw %r0, 0x1111111122222222