Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-9] src/common/lib/libc/arch/aarch64/atomic
Module Name: src
Committed By: martin
Date: Wed Aug 11 17:19:01 UTC 2021
Modified Files:
src/common/lib/libc/arch/aarch64/atomic [netbsd-9]: atomic_add_16.S
atomic_add_32.S atomic_add_64.S atomic_add_8.S atomic_and_16.S
atomic_and_32.S atomic_and_64.S atomic_and_8.S atomic_cas_16.S
atomic_cas_32.S atomic_cas_64.S atomic_cas_8.S atomic_dec_32.S
atomic_dec_64.S atomic_inc_32.S atomic_inc_64.S atomic_nand_16.S
atomic_nand_32.S atomic_nand_64.S atomic_nand_8.S atomic_op_asm.h
atomic_or_16.S atomic_or_32.S atomic_or_64.S atomic_or_8.S
atomic_sub_16.S atomic_sub_32.S atomic_sub_64.S atomic_sub_8.S
atomic_swap_16.S atomic_swap_32.S atomic_swap_64.S atomic_swap_8.S
atomic_xor_16.S atomic_xor_32.S atomic_xor_64.S atomic_xor_8.S
membar_ops.S
Log Message:
Pull up following revision(s) (requested by skrll in ticket #1331):
common/lib/libc/arch/aarch64/atomic/atomic_add_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_sub_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_sub_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_swap_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_swap_64.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_inc_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_or_64.S: revision 1.3
common/lib/libc/arch/aarch64/atomic/atomic_and_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_xor_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_and_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_nand_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_add_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_swap_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h: revision 1.6
common/lib/libc/arch/aarch64/atomic/atomic_cas_64.S: revision 1.4
common/lib/libc/arch/aarch64/atomic/atomic_nand_8.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_sub_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_64.S: revision 1.6
common/lib/libc/arch/aarch64/atomic/atomic_swap_8.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_sub_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_swap_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_nand_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_swap_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_xor_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_swap_32.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_or_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_nand_64.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_swap_16.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_or_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_or_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_xor_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_16.S: revision 1.4
common/lib/libc/arch/aarch64/atomic/atomic_add_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_xor_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_dec_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_32.S: revision 1.4
common/lib/libc/arch/aarch64/atomic/atomic_add_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_cas_8.S: revision 1.4
common/lib/libc/arch/aarch64/atomic/membar_ops.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_nand_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_nand_32.S: revision 1.5
common/lib/libc/arch/aarch64/atomic/atomic_inc_64.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_dec_32.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_and_8.S: revision 1.2
common/lib/libc/arch/aarch64/atomic/atomic_and_64.S: revision 1.2
Part I of ad@'s performance improvements for aarch64
- Remove memory barriers from the atomic ops. I don't understand why thos=
e
are there. Is it some architectural thing, or for a CPU bug, or just
over-caution maybe? They're not needed for correctness.
- Have unlikely conditional branches go forwards to help the static branch
predictor.
Remove memory barriers from the atomic ops macros in the same way as was
done for the other atomic ops earlier.
Use the correct barriers - all of membar_{sync,producer,consumer} have
less scope than before.
LGTM from riastradh
As we're providing the legacy gcc __sync built-in functions for atomic
memory access we might as well get the memory barriers right...
From the gcc documentation:
In most cases, these built-in functions are considered a full barrier.
That is, no memory operand is moved across the operation, either forward
or backward. Further, instructions are issued as necessary to prevent the
processor from speculating loads across the operation and from queuing
stores after the operation.
type __sync_lock_test_and_set (type *ptr, type value, ...)
This built-in function is not a full barrier, but rather an acquire
barrier. This means that references after the operation cannot move to
(or be speculated to) before the operation, but previous memory stores
may not be globally visible yet, and previous memory loads may not yet
be satisfied.
void __sync_lock_release (type *ptr, ...)
This built-in function is not a full barrier, but rather a release
barrier. This means that all previous memory stores are globally
visible, and all previous memory loads have been satisfied, but
following memory reads are not prevented from being speculated to
before the barrier.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.28.1 \
src/common/lib/libc/arch/aarch64/atomic/atomic_add_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_add_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_add_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_add_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_and_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_and_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_and_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_and_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_cas_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_cas_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_cas_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_dec_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_dec_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_inc_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_inc_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_or_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_or_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_or_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_sub_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_sub_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_sub_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_sub_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_swap_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_swap_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_swap_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_swap_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_xor_16.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_xor_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_xor_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_xor_8.S \
src/common/lib/libc/arch/aarch64/atomic/membar_ops.S
cvs rdiff -u -r1.3 -r1.3.2.1 \
src/common/lib/libc/arch/aarch64/atomic/atomic_cas_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_op_asm.h
cvs rdiff -u -r1.1.28.2 -r1.1.28.3 \
src/common/lib/libc/arch/aarch64/atomic/atomic_nand_16.S
cvs rdiff -u -r1.1.28.1 -r1.1.28.2 \
src/common/lib/libc/arch/aarch64/atomic/atomic_nand_32.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_nand_64.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_nand_8.S \
src/common/lib/libc/arch/aarch64/atomic/atomic_or_64.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index