[binutils-gdb] aarch64: Remove redundant macros

Alice Carlotti acarlotti@sourceware.org
Sat Jan 24 07:18:04 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99f44ae8d0b29a048778e090bbf8f1f991f1f493

commit 99f44ae8d0b29a048778e090bbf8f1f991f1f493
Author: Alice Carlotti <alice.carlotti@arm.com>
Date:   Sat Jan 24 01:39:15 2026 +0000

    aarch64: Remove redundant macros
    
    We no longer encode flags in the aarch64_hint_options value field, so
    delete the HINT_VAL, HINT_FLAG and HINT_ENCODE macros.

Diff:
---
 opcodes/aarch64-dis.c | 2 +-
 opcodes/aarch64-opc.h | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index 310a62220cf..8cc2eb3f3c2 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -1526,7 +1526,7 @@ aarch64_ext_hint (const aarch64_operand *self ATTRIBUTE_UNUSED,
 
   for (i = 0; aarch64_hint_options[i].name != NULL; i++)
     {
-      if (hint_number == HINT_VAL (aarch64_hint_options[i].value))
+      if (hint_number == aarch64_hint_options[i].value)
 	{
 	  info->hint_option = &(aarch64_hint_options[i]);
 	  return true;
diff --git a/opcodes/aarch64-opc.h b/opcodes/aarch64-opc.h
index 17bbaaa4a55..2ba48854cc4 100644
--- a/opcodes/aarch64-opc.h
+++ b/opcodes/aarch64-opc.h
@@ -395,11 +395,6 @@ verify_constraints (const struct aarch64_inst *, const aarch64_insn, bfd_vma,
 #define F_REG_MAX_VALUE(X) ((X) << 15)
 #define F_GET_REG_MAX_VALUE(X) (((X) >> 15) & 0x0f)
 
-/* Encode 7-bit HINT #imm in the lower 8 bits.  Use higher bits for flags.  */
-#define HINT_ENCODE(flag, val) ((flag << 8) | val)
-#define HINT_FLAG(val) (val >> 8)
-#define HINT_VAL(val) (val & 0xff)
-
 static inline bool
 operand_has_inserter (const aarch64_operand *operand)
 {


More information about the Binutils-cvs mailing list