]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
targhooks: i386: rename TAG_SIZE to TAG_BITSIZE
authorIndu Bhagat <indu.bhagat@oracle.com>
Wed, 9 Jul 2025 11:23:53 +0000 (14:23 +0300)
committerClaudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Mon, 25 Aug 2025 11:17:32 +0000 (14:17 +0300)
gcc/Changelog:

* asan.h (HWASAN_TAG_SIZE): Use targetm.memtag.tag_bitsize.
* config/i386/i386.cc (ix86_memtag_tag_size): Rename to
ix86_memtag_tag_bitsize.
(TARGET_MEMTAG_TAG_SIZE): Renamed to TARGET_MEMTAG_TAG_BITSIZE.
* doc/tm.texi (TARGET_MEMTAG_TAG_SIZE): Likewise.
* doc/tm.texi.in (TARGET_MEMTAG_TAG_SIZE): Likewise.
* target.def (tag_size): Rename to tag_bitsize.
* targhooks.cc (default_memtag_tag_size): Rename to
default_memtag_tag_bitsize.
* targhooks.h (default_memtag_tag_size): Likewise.

Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Co-authored-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
gcc/asan.h
gcc/config/i386/i386.cc
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/target.def
gcc/targhooks.cc
gcc/targhooks.h

index 0a3f5e927c77e6fce848aeee27c47787ea9b703b..a24562f67a29e391c0fb6d3f21aae43caeeca81b 100644 (file)
@@ -103,7 +103,7 @@ extern hash_set <tree> *asan_used_labels;
    independently here.  */
 /* How many bits are used to store a tag in a pointer.
    The default version uses the entire top byte of a pointer (i.e. 8 bits).  */
-#define HWASAN_TAG_SIZE targetm.memtag.tag_size ()
+#define HWASAN_TAG_SIZE targetm.memtag.tag_bitsize ()
 /* Tag Granule of HWASAN shadow stack.
    This is the size in real memory that each byte in the shadow memory refers
    to.  I.e. if a variable is X bytes long in memory then its tag in shadow
index b4b84b9fecba004effb7246d6be6eb53287d2a2c..9093f2077346a1387aa33cf7c8a7c1ccdcf5cd9d 100644 (file)
@@ -27202,9 +27202,9 @@ ix86_memtag_can_tag_addresses ()
   return ix86_lam_type != lam_none && TARGET_LP64;
 }
 
-/* Implement TARGET_MEMTAG_TAG_SIZE.  */
+/* Implement TARGET_MEMTAG_TAG_BITSIZE.  */
 unsigned char
-ix86_memtag_tag_size ()
+ix86_memtag_tag_bitsize ()
 {
   return IX86_HWASAN_TAG_SIZE;
 }
@@ -28178,8 +28178,8 @@ ix86_libgcc_floating_mode_supported_p
 #undef TARGET_MEMTAG_UNTAGGED_POINTER
 #define TARGET_MEMTAG_UNTAGGED_POINTER ix86_memtag_untagged_pointer
 
-#undef TARGET_MEMTAG_TAG_SIZE
-#define TARGET_MEMTAG_TAG_SIZE ix86_memtag_tag_size
+#undef TARGET_MEMTAG_TAG_BITSIZE
+#define TARGET_MEMTAG_TAG_BITSIZE ix86_memtag_tag_bitsize
 
 #undef TARGET_GEN_CCMP_FIRST
 #define TARGET_GEN_CCMP_FIRST ix86_gen_ccmp_first
index 4c338c382adccd6194306d400b4f19763d0e8973..37642680f4230e1d7ceb93d9c1557c1baa918101 100644 (file)
@@ -12881,7 +12881,7 @@ At preset, this feature does not support address spaces.  It also requires
 @code{Pmode} to be the same as @code{ptr_mode}.
 @end deftypefn
 
-@deftypefn {Target Hook} uint8_t TARGET_MEMTAG_TAG_SIZE ()
+@deftypefn {Target Hook} uint8_t TARGET_MEMTAG_TAG_BITSIZE ()
 Return the size of a tag (in bits) for this platform.
 
 The default returns 8.
index 12b8ed660a084cca8c5633b8e81975f0c4966960..c3ed9a9fd7c28179a2a9e79b1193d5a3d2dcf4ae 100644 (file)
@@ -8136,7 +8136,7 @@ maintainer is familiar with.
 
 @hook TARGET_MEMTAG_CAN_TAG_ADDRESSES
 
-@hook TARGET_MEMTAG_TAG_SIZE
+@hook TARGET_MEMTAG_TAG_BITSIZE
 
 @hook TARGET_MEMTAG_GRANULE_SIZE
 
index 5dd8f253ef6e33ebd274cf6d799ef2a79116f375..8e491d83864291c6e941e392da9f255534d2e1ec 100644 (file)
@@ -7475,11 +7475,11 @@ At preset, this feature does not support address spaces.  It also requires\n\
  bool, (), default_memtag_can_tag_addresses)
 
 DEFHOOK
-(tag_size,
+(tag_bitsize,
  "Return the size of a tag (in bits) for this platform.\n\
 \n\
 The default returns 8.",
-  uint8_t, (), default_memtag_tag_size)
+  uint8_t, (), default_memtag_tag_bitsize)
 
 DEFHOOK
 (granule_size,
index e723bbbc4df65498d87d5efaa1991e21421f8a06..947e39aedc183edc9e3d34da94b3432381b7fdeb 100644 (file)
@@ -2808,7 +2808,7 @@ default_memtag_can_tag_addresses ()
 }
 
 uint8_t
-default_memtag_tag_size ()
+default_memtag_tag_bitsize ()
 {
   return 8;
 }
index 3fa20af0e1110066623da853f15c6b90d40d343d..34c30d4af453c86cc99007550bfc58f54311d0d3 100644 (file)
@@ -310,7 +310,7 @@ extern bool speculation_safe_value_not_needed (bool);
 extern rtx default_speculation_safe_value (machine_mode, rtx, rtx, rtx);
 
 extern bool default_memtag_can_tag_addresses ();
-extern uint8_t default_memtag_tag_size ();
+extern uint8_t default_memtag_tag_bitsize ();
 extern uint8_t default_memtag_granule_size ();
 extern rtx default_memtag_insert_random_tag (rtx, rtx);
 extern rtx default_memtag_add_tag (rtx, poly_int64, uint8_t);