[PATCH 6/7] opcodes: microblaze: remove pcmpbc

Samuel Price thesamprice@gmail.com
Mon Nov 9 04:08:10 GMT 2026


pcmpbc (0x84000400) is in the opcode table, but no MicroBlaze manual
defines it.  UG984 and the older UG081 list three pattern compare
instructions, pcmpbf, pcmpeq and pcmpne, and both define the low 11
bits of and as zero, so the word is not a valid and either.  QEMU's
decoder has no pattern for it, and GCC never emits it.

Remove it from the table and from enum microblaze_instr.  gas now
rejects it as an unknown opcode, and objdump prints the word as .long.
I have not tried the word on hardware.

opcodes/
	* microblaze-opc.h (MAX_OPCODES): Decrease to 290.
	(microblaze_opcodes): Remove pcmpbc.
	* microblaze-opcm.h (microblaze_instr): Remove pcmpbc.

Signed-off-by: Sam Price <thesamprice@gmail.com>
Assisted-by: Claude (Anthropic)
---
 opcodes/microblaze-opc.h  | 3 +--
 opcodes/microblaze-opcm.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h
index fe435ad5a88..ceb726866d2 100644
--- a/opcodes/microblaze-opc.h
+++ b/opcodes/microblaze-opc.h
@@ -108,7 +108,7 @@
 #define DELAY_SLOT 1
 #define NO_DELAY_SLOT 0
 
-#define MAX_OPCODES 291
+#define MAX_OPCODES 290
 
 const struct op_code_struct
 {
@@ -172,7 +172,6 @@ const struct op_code_struct
   {"xor",   INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000000, OPCODE_MASK_H4, microblaze_xor, logical_inst },
   {"andn",  INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000000, OPCODE_MASK_H4, andn, logical_inst },
   {"pcmpbf",INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000400, OPCODE_MASK_H4, pcmpbf, logical_inst },
-  {"pcmpbc",INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x84000400, OPCODE_MASK_H4, pcmpbc, logical_inst },
   {"pcmpeq",INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000400, OPCODE_MASK_H4, pcmpeq, logical_inst },
   {"pcmpne",INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000400, OPCODE_MASK_H4, pcmpne, logical_inst },
   {"sra",   INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000001, OPCODE_MASK_H34, sra, logical_inst },
diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h
index f95ef1492b9..439c4735ff8 100644
--- a/opcodes/microblaze-opcm.h
+++ b/opcodes/microblaze-opcm.h
@@ -32,7 +32,7 @@ enum microblaze_instr
   ncget, ncput, muli, bslli, bsrai, bsrli, bsefi, bsifi, mului,
   /* 'or/and/xor' are C++ keywords.  */
   microblaze_or, microblaze_and, microblaze_xor,
-  andn, pcmpbf, pcmpbc, pcmpeq, pcmpne, sra, src, srl, sext8, sext16,
+  andn, pcmpbf, pcmpeq, pcmpne, sra, src, srl, sext8, sext16,
   wic, wdc, wdcclear, wdcextclear, wdcflush, wdcextflush, wdcclearea, mts, mtse,
   mfs, mfse, mbar, br, brd, brld, bra, brad, brald, microblaze_brk, beq, beqd,
   bne, bned, blt, bltd, ble, bled, bgt, bgtd, bge, bged, ori, andi, xori, andni,
-- 
2.39.5 (Apple Git-154)



More information about the Binutils mailing list