capstone/suite/synctools
2019-05-10 16:51:23 +08:00
..
strinforeduce add suite/synctools 2019-05-07 12:26:19 +08:00
tablegen ppc: print condition register bits. issue #1469 2019-05-08 13:56:40 +08:00
.gitignore add suite/synctools 2019-05-07 12:26:19 +08:00
arm64_gen_vreg.c add suite/synctools 2019-05-07 12:26:19 +08:00
asmwriter.py add suite/synctools 2019-05-07 12:26:19 +08:00
compare_mapping_insn.py add suite/synctools 2019-05-07 12:26:19 +08:00
disassemblertables2.c add suite/synctools 2019-05-07 12:26:19 +08:00
disassemblertables_reduce.py add suite/synctools 2019-05-07 12:26:19 +08:00
disassemblertables-arch.py add suite/synctools 2019-05-07 12:26:19 +08:00
disassemblertables.py add suite/synctools 2019-05-07 12:26:19 +08:00
genall-arch.sh synctools: udpate somes scripts 2019-05-10 16:51:23 +08:00
genall-full.sh synctools: udpate somes scripts 2019-05-10 16:51:23 +08:00
genall-reduce.sh add suite/synctools 2019-05-07 12:26:19 +08:00
insn3.py add suite/synctools 2019-05-07 12:26:19 +08:00
insn_check.py add suite/synctools 2019-05-07 12:26:19 +08:00
insn.py add suite/synctools 2019-05-07 12:26:19 +08:00
instrinfo-arch.py add suite/synctools 2019-05-07 12:26:19 +08:00
instrinfo.py add suite/synctools 2019-05-07 12:26:19 +08:00
Makefile synctools: udpate somes scripts 2019-05-10 16:51:23 +08:00
mapping_insn_name-arch.py add suite/synctools 2019-05-07 12:26:19 +08:00
mapping_insn_name.py add suite/synctools 2019-05-07 12:26:19 +08:00
mapping_insn_op-arch.py add suite/synctools 2019-05-07 12:26:19 +08:00
mapping_insn_op.py add suite/synctools 2019-05-07 12:26:19 +08:00
mapping_insn-arch.py add suite/synctools 2019-05-07 12:26:19 +08:00
mapping_insn.py add suite/synctools 2019-05-07 12:26:19 +08:00
mapping_reg.py add suite/synctools 2019-05-07 12:26:19 +08:00
README add suite/synctools 2019-05-07 12:26:19 +08:00
register.py add suite/synctools 2019-05-07 12:26:19 +08:00
registerinfo.py add suite/synctools 2019-05-07 12:26:19 +08:00
subtargetinfo.py add suite/synctools 2019-05-07 12:26:19 +08:00
systemoperand.py add suite/synctools 2019-05-07 12:26:19 +08:00
systemregister.py add suite/synctools 2019-05-07 12:26:19 +08:00
X86DisassemblerDecoderCommon.h add suite/synctools 2019-05-07 12:26:19 +08:00

Sync tools to port LLVM inc files to Capstone.

For X86
=======
0. cd tablegen/, then follow its README.

1. Run genall-{full|reduce}.sh, then copy generated .inc files to arch/<ARCH>/ directory

    $ ./genall-full.sh tablegen ~/projects/tmp/capstone777.git/arch/X86
    $ ./genall-reduce.sh tablegen ~/projects/tmp/capstone777.git/arch/X86

2. Run disassemblertables_reduce2 & disassemblertables_reduce2 to generate optimized (index table) X86GenDisassemblerTables2.inc & X86GenDisassemblerTables_reduce2.inc

    # use 2x name to avoid overwritting X86GenDisassemblerTables2.inc & X86GenDisassemblerTables_reduce2.inc

    $ make
    $ ./disassemblertables2 > X86GenDisassemblerTables2x.inc
    $ ./disassemblertables_reduce2 > X86GenDisassemblerTables_reduce2x.inc

3. cd strinforeduce/, and follow its README.

4. Copy all generated .inc files to arch/X86/

    $ cp X86GenAsmWriter_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenAsmWriter1_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86MappingInsnName_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86MappingInsn_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86MappingInsnOp_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenInstrInfo_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenDisassemblerTables_reduce.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenDisassemblerTables_reduce2x.inc ~/projects/capstone.git/arch/X86/X86GenDisassemblerTables_reduce2.inc

    $ cp X86GenAsmWriter.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenAsmWriter1.inc ~/projects/capstone.git/arch/X86
    $ cp X86MappingInsnName.inc ~/projects/capstone.git/arch/X86
    $ cp X86MappingInsn.inc ~/projects/capstone.git/arch/X86
    $ cp X86MappingInsnOp.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenInstrInfo.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenDisassemblerTables.inc ~/projects/capstone.git/arch/X86
    $ cp X86GenDisassemblerTables2x.inc ~/projects/capstone.git/arch/X86/X86GenDisassemblerTables2.inc

5. copy insn_list.txt to include/capstone/<arch.h>

For non-X86
===========

0. cd tablegen/, then follow its README.

	1. Run gen-tablegen-arch.sh

2. Run genall-arch.sh

   ./genall-arch.sh tablegen ~/projects/capstone.git/arch/ARM ARM
   ./genall-arch.sh tablegen ~/projects/capstone.git/arch/ARM AArch64
   ./genall-arch.sh tablegen ~/projects/capstone.git/arch/ARM PowerPC

3. Copy generated *.inc files to arch/<arch>/