Opcodes icon indicating copy to clipboard operation
Opcodes copied to clipboard

How do you generate the XML files?

Open bergercookie opened this issue 3 years ago • 2 comments

This isn't a question regarding the functionality of the tool but rather about the generation of the XML files in the first place. I suppose you didn't write it by hand. Did you grab the information using a PDF miner?

Could you shed some light in the details of the generation procedure?

As a separate topic, how would you generate a similar XML table for ARM instructions?

Thanks for your help

bergercookie avatar Jul 12 '20 14:07 bergercookie

There is some info in the paper:

Information on instructions in the Opcodes package is a result of multi-stage process. The first pass parses information about instruction name,components of encoding and explicit operands from text descriptions extracted from Intel’s and AMD’s instruction set manuals. The next pass enrich the instruction entries with additional information: •Information about input and output operands is added based on pattern matching. •Relatively few instructions have implicit operands. This information is added in a separate pass based on instruction name and operand types. •A separate pass matches components of instruction encodings with the operands they encode. •Another pass groups instruction forms with the same names and explicit operands. The instruction forms may originate from conceptually different instructions, e.g. the instruction forms MOVQ r64, m64 has two encodings which originate from general-purpose MOVQ r64,r64/m64 instruction and MMX technology instruction MOVQ r64, mm/m64. •Extra passes mark instructions with cancelling inputs(e.g.SUB r32, r32) and assign instruction names in AT&T and Go assembly.

But I don't see the scripts for it anywhere. It's too bad, the code for generating the XML is much more maintainable long term than the XML itself.

Mathnerd314 avatar Jun 28 '21 02:06 Mathnerd314

Is this at all related to MazeGen's x86asm reference (ref.x86asm.net)?

arizvisa avatar Sep 13 '22 23:09 arizvisa

The description in the paper quoted above described the process. The scripts are not open source, and I have no plans to release them.

@arizvisa this project is unrelated.

Maratyszcza avatar Oct 29 '23 21:10 Maratyszcza