diff options
author | Lulu Cheng <chenglulu@loongson.cn> | 2023-11-17 15:42:53 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2023-11-18 16:14:43 +0800 |
commit | 1b12e7a07fe45570a0f846a7ad19a272062a6691 (patch) | |
tree | b501b4358a344423fdc1a071622a2691002f2969 /gcc/coverage.cc | |
parent | c68463abbab98aa7f5a9b91e71ed6f6834c723df (diff) | |
download | gcc-1b12e7a07fe45570a0f846a7ad19a272062a6691.zip gcc-1b12e7a07fe45570a0f846a7ad19a272062a6691.tar.gz gcc-1b12e7a07fe45570a0f846a7ad19a272062a6691.tar.bz2 |
LoongArch: Implement atomic operations using LoongArch1.1 instructions.
1. short and char type calls for atomic_add_fetch and __atomic_fetch_add are
implemented using amadd{_db}.{b/h}.
2. Use amcas{_db}.{b/h/w/d} to implement __atomic_compare_exchange_n and __atomic_compare_exchange.
3. The short and char types of the functions __atomic_exchange and __atomic_exchange_n are
implemented using amswap{_db}.{b/h}.
gcc/ChangeLog:
* config/loongarch/loongarch-def.h: Add comments.
* config/loongarch/loongarch-opts.h (ISA_BASE_IS_LA64V110): Define macro.
* config/loongarch/loongarch.cc (loongarch_memmodel_needs_rel_acq_fence):
Remove redundant code implementations.
* config/loongarch/sync.md (d): Added QI, HI support.
(atomic_add<mode>): New template.
(atomic_exchange<mode>_short): Likewise.
(atomic_cas_value_strong<mode>_amcas): Likewise..
(atomic_fetch_add<mode>_short): Likewise.
Diffstat (limited to 'gcc/coverage.cc')
0 files changed, 0 insertions, 0 deletions