Disassembler decoding conflict

I have an ADDI instruction and an ADDI_Clone instruction which is just a special case of ADDI. The 2 have the same opcode. During generation of XXXGenDisassemblerTables.inc, I get this message

Decoding Conflict:

00000…

ADDI 00000___________

ADDI_clone 00000___________

What is the proper way to solve this conflict?

Thanks.

You can set the DecoderMethod field of both instructions to point to a C++ decode function (in Disassembler.cpp), which can then do whatever you need to do to disambiguate between the two instructions. DecodeCPSInstruction in the ARM backend looks like a good example of this.

Oliver

I have an ADDI instruction and an ADDI_Clone instruction which is just a special case of ADDI. The 2 have the same opcode. During generation of XXXGenDisassemblerTables.inc, I get this message

Decoding Conflict:
00000...........
................
ADDI 00000___________
ADDI_clone 00000___________

What is the proper way to solve this conflict?

Should your ADDI_clone be marked with isCodeGenOnly = 1 - if you're only using it for specialized code generation, then this is the right solution.

-Hal

Thanks.