[llvm] [MC][TableGen] Expand Opcode field of MCInstrDesc (PR #179652)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 16 04:07:56 PST 2026


================
@@ -474,7 +474,7 @@ void MapTableEmitter::emitTablesWithFunc(raw_ostream &OS) {
   const ListInit *ColFields = InstrMapDesc.getColFields();
   ArrayRef<const ListInit *> ValueCols = InstrMapDesc.getValueCols();
   OS << "// " << InstrMapDesc.getName() << "\nLLVM_READONLY\n";
-  OS << "int " << InstrMapDesc.getName() << "(uint16_t Opcode";
+  OS << "long " << InstrMapDesc.getName() << "(uint32_t Opcode";
----------------
jayfoad wrote:

I am not keen on all the changes that use int64_t for an "opcode or -1" value. We will never have 2 billion opcodes so int should still be safe.

https://github.com/llvm/llvm-project/pull/179652


More information about the llvm-commits mailing list