From 48fa4131e419942efc9dd762694fdc7e819de392 Mon Sep 17 00:00:00 2001 From: konglin1 Date: Mon, 7 Nov 2022 11:21:14 +0800 Subject: i386: Prefer remote atomic insn for atomic_fetch{add, and, or, xor} Add flag -mprefer-remote-atomic to control whether to generate raoint insn for atomic operations. gcc/ChangeLog: * config/i386/i386.opt:Add -mprefer-remote-atomic. * config/i386/sync.md (atomic_): New define_expand. (atomic_add): Rename to below one. (atomic_add_1): To this. (atomic_): Ditto. (atomic__1): Ditto. * doc/invoke.texi: Add -mprefer-remote-atomic. gcc/testsuite/ChangeLog: * gcc.target/i386/raoint-atomic-fetch.c: New test. --- gcc/doc/invoke.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7417f52..fa6adfd 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1438,7 +1438,7 @@ See RS/6000 and PowerPC Options. -mrdseed -msgx -mavx512vp2intersect -mserialize -mtsxldtrk@gol -mamx-tile -mamx-int8 -mamx-bf16 -muintr -mhreset -mavxvnni@gol -mavx512fp16 -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 @gol --mprefetchi -mraoint @gol +-mprefetchi -mraoint -mprefer-remote-atomic@gol -mcldemote -mms-bitfields -mno-align-stringops -minline-all-stringops @gol -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol -mkl -mwidekl @gol @@ -33666,6 +33666,10 @@ execute pause if load value is not expected. This reduces excessive cachline bouncing when and works for all atomic logic fetch builtins that generates compare and swap loop. +@item -mprefer-remote-atomic +@opindex mprefer-remote-atomic +Prefer use remote atomic insn for atomic operations. + @item -mindirect-branch=@var{choice} @opindex mindirect-branch Convert indirect call and jump with @var{choice}. The default is -- cgit v1.1