diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2018-07-31 17:36:36 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2018-07-31 17:36:36 +0000 |
commit | f3debef33629f8e8a95b5ed0cb79296e7a0282df (patch) | |
tree | f5992c2819cabd23432a44ebf8afd245a075eed1 /gcc/doc/tm.texi | |
parent | c0111dc43591647ef6d619a1fc222a8e9a06e058 (diff) | |
download | gcc-f3debef33629f8e8a95b5ed0cb79296e7a0282df.zip gcc-f3debef33629f8e8a95b5ed0cb79296e7a0282df.tar.gz gcc-f3debef33629f8e8a95b5ed0cb79296e7a0282df.tar.bz2 |
targhooks - provide an alternative hook for targets that never execute speculatively
This hook adds an alternative implementation for the target hook
TARGET_HAVE_SPECULATION_SAFE_VALUE; it can be used by targets that have no
CPU implementations that execute code speculatively. All that is needed for
such targets now is to add:
#undef TARGET_HAVE_SPECULATION_SAFE_VALUE
#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed.
to where you have your other target hooks and you're done.
gcc:
* targhooks.h (speculation_safe_value_not_needed): New prototype.
* targhooks.c (speculation_safe_value_not_needed): New function.
* target.def (have_speculation_safe_value): Update documentation.
* doc/tm.texi: Regenerated.
From-SVN: r263175
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 351f0b3..a40f45a 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -11935,6 +11935,11 @@ This hook is used to determine the level of target support for a pattern named @code{speculation_barrier}. Else it returns true for the first case and whether the pattern is enabled for the current compilation for the second case. + + For targets that have no processors that can execute instructions + speculatively an alternative implemenation of this hook is available: + simply redefine this hook to @code{speculation_safe_value_not_needed} + along with your other target hooks. @end deftypefn @deftypefn {Target Hook} rtx TARGET_SPECULATION_SAFE_VALUE (machine_mode @var{mode}, rtx @var{result}, rtx @var{val}, rtx @var{failval}) |