diff options
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 9ee6a835e85..aceebf6d860 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -6559,7 +6559,7 @@ based on a variable or function decl, a section name, and whether or not the declaration's initializer may contain runtime relocations. @var{decl} may be null, in which case read-write data should be assumed. -The default version if this function handles choosing code vs data, +The default version of this function handles choosing code vs data, read-only vs read-write data, and @code{flag_pic}. You should only need to override this if your target has special flags that might be set via @code{__attribute__}. @@ -9143,6 +9143,34 @@ If this is the case, making @code{TRULY_NOOP_TRUNCATION} return 0 in such cases may improve things. @end defmac +@deftypefn {Target Hook} int TARGET_MODE_REP_EXTENDED (enum machine_mode @var{mode}, enum machine_mode @var{rep_mode}) +The representation of an integral mode can be such that the values +are always extended to a wider integral mode. Return +@code{SIGN_EXTEND} if values of @var{mode} are represented in +sign-extended form to @var{rep_mode}. Return @code{UNKNOWN} +otherwise. (Currently, none of the targets use zero-extended +representation this way so unlike @code{LOAD_EXTEND_OP}, +@code{TARGET_MODE_REP_EXTENDED} is expected to return either +@code{SIGN_EXTEND} or @code{UNKNOWN}. Also no target extends +@var{mode} to @var{mode_rep} so that @var{mode_rep} is not the next +widest integral mode and currently we take advantage of this fact.) + +Similarly to @code{LOAD_EXTEND_OP} you may return a non-@code{UNKNOWN} +value even if the extension is not performed on certain hard registers +as long as for the @code{REGNO_REG_CLASS} of these hard registers +@code{CANNOT_CHANGE_MODE_CLASS} returns nonzero. + +Note that @code{TARGET_MODE_REP_EXTENDED} and @code{LOAD_EXTEND_OP} +describe two related properties. If you define +@code{TARGET_MODE_REP_EXTENDED (mode, word_mode)} you probably also want +to define @code{LOAD_EXTEND_OP (mode)} to return the same type of +extension. + +In order to enforce the representation of @code{mode}, +@code{TRULY_NOOP_TRUNCATION} should return false when truncating to +@code{mode}. +@end deftypefn + @defmac STORE_FLAG_VALUE A C expression describing the value returned by a comparison operator with an integral mode and stored by a store-flag instruction |