@@ -12820,6 +12820,11 @@ Store the result in @var{target} if convenient.
The default clears the top byte of the original pointer.
@end deftypefn
+@deftypefn {Target Hook} rtx TARGET_MEMTAG_TAG_MEMORY (rtx @var{base}, rtx @var{size}, rtx @var{tagged_pointer})
+Tag memory at address @var{base} TBD FIXME.
+The default clears the top byte of the original pointer.
+@end deftypefn
+
@deftypevr {Target Hook} bool TARGET_HAVE_SHADOW_CALL_STACK
This value is true if the target platform supports
@option{-fsanitize=shadow-call-stack}. The default value is false.
@@ -8121,6 +8121,8 @@ maintainer is familiar with.
@hook TARGET_MEMTAG_UNTAGGED_POINTER
+@hook TARGET_MEMTAG_TAG_MEMORY
+
@hook TARGET_HAVE_SHADOW_CALL_STACK
@hook TARGET_HAVE_LIBATOMIC
@@ -7419,6 +7419,12 @@ Store the result in @var{target} if convenient.\n\
The default clears the top byte of the original pointer.",
rtx, (rtx tagged_pointer, rtx target), default_memtag_untagged_pointer)
+DEFHOOK
+(tag_memory,
+ "Tag memory at address @var{base} TBD FIXME.\n\
+The default clears the top byte of the original pointer.",
+ rtx, (rtx base, rtx size, rtx tagged_pointer), default_memtag_tag_memory)
+
HOOK_VECTOR_END (memtag)
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"
@@ -2843,4 +2843,11 @@ default_memtag_untagged_pointer (rtx tagged_pointer, rtx target)
return untagged_base;
}
+/* The default implementation of TARGET_MEMTAG_TAG_MEMORY. */
+rtx
+default_memtag_tag_memory (rtx, rtx, rtx)
+{
+ gcc_unreachable ();
+}
+
#include "gt-targhooks.h"
@@ -308,5 +308,6 @@ extern rtx default_memtag_add_tag (rtx, poly_int64, uint8_t);
extern rtx default_memtag_set_tag (rtx, rtx, rtx);
extern rtx default_memtag_extract_tag (rtx, rtx);
extern rtx default_memtag_untagged_pointer (rtx, rtx);
+extern rtx default_memtag_tag_memory (rtx, rtx, rtx);
#endif /* GCC_TARGHOOKS_H */