summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorolegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-29 20:26:41 +0000
committerolegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-29 20:26:41 +0000
commite10782c95fe24b65ed60056cabb8f0cacbdf1c44 (patch)
tree76356e565c5926add00d238c3ec6c9fe0bd95e27 /gcc/doc
parent59c7f52cc3459f21616a58ecbad90c593444ec8d (diff)
downloadgcc-e10782c95fe24b65ed60056cabb8f0cacbdf1c44.tar.gz
PR target/52941
* config/sh/predicates.md (atomic_arith_operand, atomic_logical_operand): New predicates. * config/sh/sh.c (sh_option_override): Check atomic options. * config/sh/sh.h (TARGET_ANY_ATOMIC, UNSUPPORTED_ATOMIC_OPTIONS, UNSUPPORTED_HARD_ATOMIC_CPU): New macros. (DRIVER_SELF_SPECS): Use UNSUPPORTED_ATOMIC_OPTIONS and UNSUPPORTED_HARD_ATOMIC_CPU. * config/sh/sync.md: Update description comments. (I12): New mode iterator. (fetchop_predicate, fetchop_constraint): New code attributes. (atomic_compare_and_swapsi_hard, atomic_compare_and_swap<mode>_hard, atomic_exchangesi_hard, atomic_exchange<mode>_hard, atomic_fetch_<fetchop_name>si_hard, atomic_fetch_<fetchop_name><mode>_hard, atomic_fetch_nandsi_hard, atomic_fetch_nand<mode>_hard, atomic_<fetchop_name>_fetchsi_hard, atomic_<fetchop_name>_fetch<mode>_hard, atomic_nand_fetchsi_hard, atomic_nand_fetch<mode>_hard, atomic_test_and_set_hard): New insns. (atomic_compare_and_swap<mode>_soft, atomic_exchange<mode>_soft, atomic_fetch_<fetchop_name><mode>_soft, atomic_fetch_nand<mode>_soft, atomic_<fetchop_name>_fetch<mode>_soft, atomic_nand_fetch<mode>_soft, atomic_test_and_set_soft): Use same formatting for the first line of the asm block as in new insns above. (atomic_compare_and_swap<mode>, atomic_exchange<mode>, atomic_fetch_<fetchop_name><mode>, atomic_<fetchop_name>_fetch<mode>, atomic_test_and_set): Integrate new *_hard insns into expanders. * config/sh/sh.opt (mhard-atomic): New option. * doc/invoke.texi (SH Options): Document it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187987 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/invoke.texi16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e9b3b4328c2..efab5168d42 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -884,7 +884,7 @@ See RS/6000 and PowerPC Options.
-mprefergot -musermode -multcost=@var{number} -mdiv=@var{strategy} @gol
-mdivsi3_libfunc=@var{name} -mfixed-range=@var{register-range} @gol
-mindexed-addressing -mgettrcost=@var{number} -mpt-fixed @gol
--maccumulate-outgoing-args -minvalid-symbols -msoft-atomic @gol
+-maccumulate-outgoing-args -minvalid-symbols -msoft-atomic -mhard-atomic @gol
-mbranch-cost=@var{num} -mcbranchdi -mcmpeqdi -mfused-madd -mpretend-cmove @gol
-menable-tas}
@@ -18054,10 +18054,22 @@ which is incompatible with the SH ABI@.
Generate GNU/Linux compatible gUSA software atomic sequences for the atomic
built-in functions. The generated atomic sequences require support from the
interrupt / exception handling code of the system and are only suitable for
-single-core systems. They will not perform correctly on multi-core systems.
+single-core systems. They will not operate correctly on multi-core systems.
This option is enabled by default when the target is @code{sh-*-linux*}.
+When the target is SH4A, this option will also partially utilize the hardware
+atomic instructions @code{movli.l} and @code{movco.l} to create more
+efficient code.
For details on the atomic built-in functions see @ref{__atomic Builtins}.
+@item -mhard-atomic
+@opindex hard-atomic
+Generate hardware atomic sequences for the atomic built-in functions. This
+is only available on SH4A and is suitable for multi-core systems. Code
+compiled with this option will also be compatible with gUSA aware
+interrupt / exception handling systems. In contrast to the
+@option{-msoft-atomic} option this will only use the instructions
+@code{movli.l} and @code{movco.l} to create atomic sequences.
+
@item -menable-tas
@opindex menable-tas
Generate the @code{tas.b} opcode for @code{__atomic_test_and_set}.