diff options
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r-- | gcc/doc/tm.texi | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 9ee6a83..639e9e9 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -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 intergral 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 |