]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Use riscv_subword_address for atomic_test_and_set
authorPatrick O'Neill <patrick@rivosinc.com>
Tue, 31 Oct 2023 20:18:53 +0000 (13:18 -0700)
committerPatrick O'Neill <patrick@rivosinc.com>
Wed, 1 Nov 2023 22:06:04 +0000 (15:06 -0700)
commit274c904471a11c493353a8b4f6e50d8fb7fef906
tree38935829ff29b0e8593a7c28cf159d48e9fda5d9
parentea2e7bf80b8deead064d9b54c3caa852dfe009b3
RISC-V: Use riscv_subword_address for atomic_test_and_set

Other subword atomic patterns use riscv_subword_address to calculate
the aligned address, shift amount, mask and !mask. atomic_test_and_set
was implemented before the common function was added. After this patch
all subword atomic patterns use riscv_subword_address.

gcc/ChangeLog:

* config/riscv/sync.md:  Use riscv_subword_address function to
calculate the address and shift in atomic_test_and_set.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
gcc/config/riscv/sync.md