Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lock_xchg* test to return 1 on failure #258

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions tests/lock_xchg.data
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
5 changes: 1 addition & 4 deletions tests/lock_xchg32.data
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Loading