[PATCH 04/28] aarch64: Use F_OPD0_OPT to combine two gcspopm entries

Alice Carlotti alice.carlotti@arm.com
Wed Nov 4 18:42:04 GMT 2026


The canonical way to represent an opcode with an optional operand is
with a single opcode table entry marked with F_OPD*_OPT and F_DEFAULT
flags.


diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c
index d1fdea90565b2136d1b6686244b734dc576d9e1d..e9204a2d5a5fd357b27e40c9d425ff8ef675a930 100644
--- a/opcodes/aarch64-dis-2.c
+++ b/opcodes/aarch64-dis-2.c
@@ -36034,9 +36034,6 @@ aarch64_find_next_opcode (const aarch64_opcode *opcode)
       value = A64_OPID_d52b7760_gcsss2_Rt;
       break;
     case A64_OPID_d52b7760_gcsss2_Rt:
-      value = A64_OPID_d52b773f_gcspopm;
-      break;
-    case A64_OPID_d52b773f_gcspopm:
       value = A64_OPID_d52b7720_gcspopm_Rt;
       break;
     case A64_OPID_d52b7720_gcspopm_Rt:
diff --git a/opcodes/aarch64-tbl-2.h b/opcodes/aarch64-tbl-2.h
index cff4ad80f90280af4bee77ed5aa8fe971ab7aa03..dea5ada38b944f9d4c534bc565360d9c3cd07dc4 100644
--- a/opcodes/aarch64-tbl-2.h
+++ b/opcodes/aarch64-tbl-2.h
@@ -1422,7 +1422,6 @@ enum aarch64_opcode_idx
   A64_OPID_d50b7740_gcsss1_Rt,
   A64_OPID_d50b7700_gcspushm_Rt,
   A64_OPID_d52b7760_gcsss2_Rt,
-  A64_OPID_d52b773f_gcspopm,
   A64_OPID_d52b7720_gcspopm_Rt,
   A64_OPID_d91f0c00_gcsstr_Rt_ADDR_SIMPLE,
   A64_OPID_d91f1c00_gcssttr_Rt_ADDR_SIMPLE,
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h
index 1d0cd8a01ca4c8534ab85bc46295fd69881fae3c..7227fb060b705a25dac6c7192a4c120e23c95bfe 100644
--- a/opcodes/aarch64-tbl.h
+++ b/opcodes/aarch64-tbl.h
@@ -5220,8 +5220,7 @@ const struct aarch64_opcode aarch64_opcode_table[] =
   GCS_INSN ("gcsss1", 0xd50b7740, 0xffffffe0, OP1 (Rt), QL_I1X, 0),
   GCS_INSN ("gcspushm", 0xd50b7700, 0xffffffe0, OP1 (Rt), QL_I1X, 0),
   GCS_INSN ("gcsss2", 0xd52b7760, 0xffffffe0, OP1 (Rt), QL_I1X, 0),
-  GCS_INSN ("gcspopm", 0xd52b773f, 0xffffffff, OP0 (), QL_0, 0),
-  GCS_INSN ("gcspopm", 0xd52b7720, 0xffffffe0, OP1 (Rt), QL_I1X, 0),
+  GCS_INSN ("gcspopm", 0xd52b7720, 0xffffffe0, OP1 (Rt), QL_I1X, F_OPD0_OPT | F_DEFAULT (0x1F)),
   GCS_INSN ("gcsstr", 0xd91f0c00, 0xfffffc00, OP2 (Rt, ADDR_SIMPLE), QL_DST_X, 0),
   GCS_INSN ("gcssttr", 0xd91f1c00, 0xfffffc00, OP2 (Rt, ADDR_SIMPLE), QL_DST_X, 0),
   CORE_INSN ("gcsb", 0xd503227f, 0xffffffff, ic_system, 0, OP1 (BARRIER_GCSB), QL_NIL1, F_ALIAS),


More information about the Binutils mailing list