hexcore-capstone 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +191 -0
  3. package/binding.gyp +168 -0
  4. package/deps/capstone/LEB128.h +38 -0
  5. package/deps/capstone/MCDisassembler.h +14 -0
  6. package/deps/capstone/MCFixedLenDisassembler.h +32 -0
  7. package/deps/capstone/MCInst.c +270 -0
  8. package/deps/capstone/MCInst.h +165 -0
  9. package/deps/capstone/MCInstrDesc.c +41 -0
  10. package/deps/capstone/MCInstrDesc.h +167 -0
  11. package/deps/capstone/MCRegisterInfo.c +151 -0
  12. package/deps/capstone/MCRegisterInfo.h +116 -0
  13. package/deps/capstone/Mapping.c +254 -0
  14. package/deps/capstone/Mapping.h +174 -0
  15. package/deps/capstone/MathExtras.h +442 -0
  16. package/deps/capstone/SStream.c +181 -0
  17. package/deps/capstone/SStream.h +40 -0
  18. package/deps/capstone/arch/AArch64/AArch64AddressingModes.h +945 -0
  19. package/deps/capstone/arch/AArch64/AArch64BaseInfo.c +77 -0
  20. package/deps/capstone/arch/AArch64/AArch64BaseInfo.h +585 -0
  21. package/deps/capstone/arch/AArch64/AArch64Disassembler.c +2280 -0
  22. package/deps/capstone/arch/AArch64/AArch64Disassembler.h +18 -0
  23. package/deps/capstone/arch/AArch64/AArch64GenAsmWriter.inc +26589 -0
  24. package/deps/capstone/arch/AArch64/AArch64GenDisassemblerTables.inc +27322 -0
  25. package/deps/capstone/arch/AArch64/AArch64GenInstrInfo.inc +13194 -0
  26. package/deps/capstone/arch/AArch64/AArch64GenRegisterInfo.inc +3814 -0
  27. package/deps/capstone/arch/AArch64/AArch64GenRegisterName.inc +714 -0
  28. package/deps/capstone/arch/AArch64/AArch64GenRegisterV.inc +673 -0
  29. package/deps/capstone/arch/AArch64/AArch64GenSubtargetInfo.inc +229 -0
  30. package/deps/capstone/arch/AArch64/AArch64GenSystemOperands.inc +2863 -0
  31. package/deps/capstone/arch/AArch64/AArch64GenSystemOperands_enum.inc +21 -0
  32. package/deps/capstone/arch/AArch64/AArch64InstPrinter.c +3029 -0
  33. package/deps/capstone/arch/AArch64/AArch64InstPrinter.h +28 -0
  34. package/deps/capstone/arch/AArch64/AArch64Mapping.c +883 -0
  35. package/deps/capstone/arch/AArch64/AArch64Mapping.h +43 -0
  36. package/deps/capstone/arch/AArch64/AArch64MappingInsn.inc +37790 -0
  37. package/deps/capstone/arch/AArch64/AArch64MappingInsnName.inc +1282 -0
  38. package/deps/capstone/arch/AArch64/AArch64MappingInsnOp.inc +26994 -0
  39. package/deps/capstone/arch/AArch64/AArch64Module.c +44 -0
  40. package/deps/capstone/arch/AArch64/AArch64Module.h +12 -0
  41. package/deps/capstone/arch/ARM/ARMAddressingModes.h +698 -0
  42. package/deps/capstone/arch/ARM/ARMBaseInfo.h +486 -0
  43. package/deps/capstone/arch/ARM/ARMDisassembler.c +5763 -0
  44. package/deps/capstone/arch/ARM/ARMDisassembler.h +18 -0
  45. package/deps/capstone/arch/ARM/ARMGenAsmWriter.inc +9545 -0
  46. package/deps/capstone/arch/ARM/ARMGenDisassemblerTables.inc +15185 -0
  47. package/deps/capstone/arch/ARM/ARMGenInstrInfo.inc +6632 -0
  48. package/deps/capstone/arch/ARM/ARMGenRegisterInfo.inc +2102 -0
  49. package/deps/capstone/arch/ARM/ARMGenRegisterName.inc +231 -0
  50. package/deps/capstone/arch/ARM/ARMGenRegisterName_digit.inc +231 -0
  51. package/deps/capstone/arch/ARM/ARMGenSubtargetInfo.inc +162 -0
  52. package/deps/capstone/arch/ARM/ARMGenSystemRegister.inc +270 -0
  53. package/deps/capstone/arch/ARM/ARMInstPrinter.c +3364 -0
  54. package/deps/capstone/arch/ARM/ARMInstPrinter.h +43 -0
  55. package/deps/capstone/arch/ARM/ARMMapping.c +551 -0
  56. package/deps/capstone/arch/ARM/ARMMapping.h +40 -0
  57. package/deps/capstone/arch/ARM/ARMMappingInsn.inc +18772 -0
  58. package/deps/capstone/arch/ARM/ARMMappingInsnName.inc +475 -0
  59. package/deps/capstone/arch/ARM/ARMMappingInsnOp.inc +10729 -0
  60. package/deps/capstone/arch/ARM/ARMModule.c +63 -0
  61. package/deps/capstone/arch/ARM/ARMModule.h +12 -0
  62. package/deps/capstone/arch/BPF/BPFConstants.h +88 -0
  63. package/deps/capstone/arch/BPF/BPFDisassembler.c +464 -0
  64. package/deps/capstone/arch/BPF/BPFDisassembler.h +27 -0
  65. package/deps/capstone/arch/BPF/BPFInstPrinter.c +285 -0
  66. package/deps/capstone/arch/BPF/BPFInstPrinter.h +16 -0
  67. package/deps/capstone/arch/BPF/BPFMapping.c +513 -0
  68. package/deps/capstone/arch/BPF/BPFMapping.h +21 -0
  69. package/deps/capstone/arch/BPF/BPFModule.c +34 -0
  70. package/deps/capstone/arch/BPF/BPFModule.h +12 -0
  71. package/deps/capstone/arch/EVM/EVMDisassembler.c +379 -0
  72. package/deps/capstone/arch/EVM/EVMDisassembler.h +12 -0
  73. package/deps/capstone/arch/EVM/EVMInstPrinter.c +20 -0
  74. package/deps/capstone/arch/EVM/EVMInstPrinter.h +17 -0
  75. package/deps/capstone/arch/EVM/EVMMapping.c +344 -0
  76. package/deps/capstone/arch/EVM/EVMMapping.h +8 -0
  77. package/deps/capstone/arch/EVM/EVMMappingInsn.inc +259 -0
  78. package/deps/capstone/arch/EVM/EVMModule.c +33 -0
  79. package/deps/capstone/arch/EVM/EVMModule.h +12 -0
  80. package/deps/capstone/arch/M680X/M680XDisassembler.c +2307 -0
  81. package/deps/capstone/arch/M680X/M680XDisassembler.h +17 -0
  82. package/deps/capstone/arch/M680X/M680XDisassemblerInternals.h +57 -0
  83. package/deps/capstone/arch/M680X/M680XInstPrinter.c +360 -0
  84. package/deps/capstone/arch/M680X/M680XInstPrinter.h +25 -0
  85. package/deps/capstone/arch/M680X/M680XModule.c +77 -0
  86. package/deps/capstone/arch/M680X/M680XModule.h +12 -0
  87. package/deps/capstone/arch/M680X/cpu12.inc +335 -0
  88. package/deps/capstone/arch/M680X/hcs08.inc +60 -0
  89. package/deps/capstone/arch/M680X/hd6301.inc +15 -0
  90. package/deps/capstone/arch/M680X/hd6309.inc +259 -0
  91. package/deps/capstone/arch/M680X/insn_props.inc +367 -0
  92. package/deps/capstone/arch/M680X/m6800.inc +277 -0
  93. package/deps/capstone/arch/M680X/m6801.inc +39 -0
  94. package/deps/capstone/arch/M680X/m6805.inc +277 -0
  95. package/deps/capstone/arch/M680X/m6808.inc +91 -0
  96. package/deps/capstone/arch/M680X/m6809.inc +352 -0
  97. package/deps/capstone/arch/M680X/m6811.inc +105 -0
  98. package/deps/capstone/arch/M68K/M68KDisassembler.c +3668 -0
  99. package/deps/capstone/arch/M68K/M68KDisassembler.h +30 -0
  100. package/deps/capstone/arch/M68K/M68KInstPrinter.c +387 -0
  101. package/deps/capstone/arch/M68K/M68KInstPrinter.h +21 -0
  102. package/deps/capstone/arch/M68K/M68KInstructionTable.inc +65540 -0
  103. package/deps/capstone/arch/M68K/M68KModule.c +42 -0
  104. package/deps/capstone/arch/M68K/M68KModule.h +12 -0
  105. package/deps/capstone/arch/MOS65XX/MOS65XXDisassembler.c +544 -0
  106. package/deps/capstone/arch/MOS65XX/MOS65XXDisassembler.h +22 -0
  107. package/deps/capstone/arch/MOS65XX/MOS65XXDisassemblerInternals.h +23 -0
  108. package/deps/capstone/arch/MOS65XX/MOS65XXModule.c +79 -0
  109. package/deps/capstone/arch/MOS65XX/MOS65XXModule.h +12 -0
  110. package/deps/capstone/arch/MOS65XX/instruction_info.inc +106 -0
  111. package/deps/capstone/arch/MOS65XX/m6502.inc +256 -0
  112. package/deps/capstone/arch/MOS65XX/m65816.inc +256 -0
  113. package/deps/capstone/arch/MOS65XX/m65c02.inc +256 -0
  114. package/deps/capstone/arch/MOS65XX/mw65c02.inc +256 -0
  115. package/deps/capstone/arch/Mips/MipsDisassembler.c +1794 -0
  116. package/deps/capstone/arch/Mips/MipsDisassembler.h +16 -0
  117. package/deps/capstone/arch/Mips/MipsGenAsmWriter.inc +5725 -0
  118. package/deps/capstone/arch/Mips/MipsGenDisassemblerTables.inc +6942 -0
  119. package/deps/capstone/arch/Mips/MipsGenInstrInfo.inc +1805 -0
  120. package/deps/capstone/arch/Mips/MipsGenRegisterInfo.inc +1679 -0
  121. package/deps/capstone/arch/Mips/MipsGenSubtargetInfo.inc +52 -0
  122. package/deps/capstone/arch/Mips/MipsInstPrinter.c +424 -0
  123. package/deps/capstone/arch/Mips/MipsInstPrinter.h +25 -0
  124. package/deps/capstone/arch/Mips/MipsMapping.c +1070 -0
  125. package/deps/capstone/arch/Mips/MipsMapping.h +25 -0
  126. package/deps/capstone/arch/Mips/MipsMappingInsn.inc +9315 -0
  127. package/deps/capstone/arch/Mips/MipsModule.c +52 -0
  128. package/deps/capstone/arch/Mips/MipsModule.h +12 -0
  129. package/deps/capstone/arch/PowerPC/PPCDisassembler.c +627 -0
  130. package/deps/capstone/arch/PowerPC/PPCDisassembler.h +17 -0
  131. package/deps/capstone/arch/PowerPC/PPCGenAsmWriter.inc +11451 -0
  132. package/deps/capstone/arch/PowerPC/PPCGenDisassemblerTables.inc +6886 -0
  133. package/deps/capstone/arch/PowerPC/PPCGenInstrInfo.inc +4772 -0
  134. package/deps/capstone/arch/PowerPC/PPCGenRegisterInfo.inc +1122 -0
  135. package/deps/capstone/arch/PowerPC/PPCGenRegisterName.inc +278 -0
  136. package/deps/capstone/arch/PowerPC/PPCGenSubtargetInfo.inc +90 -0
  137. package/deps/capstone/arch/PowerPC/PPCInstPrinter.c +1238 -0
  138. package/deps/capstone/arch/PowerPC/PPCInstPrinter.h +15 -0
  139. package/deps/capstone/arch/PowerPC/PPCMapping.c +570 -0
  140. package/deps/capstone/arch/PowerPC/PPCMapping.h +40 -0
  141. package/deps/capstone/arch/PowerPC/PPCMappingInsn.inc +13220 -0
  142. package/deps/capstone/arch/PowerPC/PPCMappingInsnName.inc +1731 -0
  143. package/deps/capstone/arch/PowerPC/PPCModule.c +45 -0
  144. package/deps/capstone/arch/PowerPC/PPCModule.h +12 -0
  145. package/deps/capstone/arch/PowerPC/PPCPredicates.h +62 -0
  146. package/deps/capstone/arch/RISCV/RISCVBaseInfo.h +106 -0
  147. package/deps/capstone/arch/RISCV/RISCVDisassembler.c +433 -0
  148. package/deps/capstone/arch/RISCV/RISCVDisassembler.h +18 -0
  149. package/deps/capstone/arch/RISCV/RISCVGenAsmWriter.inc +2651 -0
  150. package/deps/capstone/arch/RISCV/RISCVGenDisassemblerTables.inc +1776 -0
  151. package/deps/capstone/arch/RISCV/RISCVGenInsnNameMaps.inc +275 -0
  152. package/deps/capstone/arch/RISCV/RISCVGenInstrInfo.inc +470 -0
  153. package/deps/capstone/arch/RISCV/RISCVGenRegisterInfo.inc +426 -0
  154. package/deps/capstone/arch/RISCV/RISCVGenSubtargetInfo.inc +33 -0
  155. package/deps/capstone/arch/RISCV/RISCVInstPrinter.c +447 -0
  156. package/deps/capstone/arch/RISCV/RISCVInstPrinter.h +24 -0
  157. package/deps/capstone/arch/RISCV/RISCVMapping.c +366 -0
  158. package/deps/capstone/arch/RISCV/RISCVMapping.h +22 -0
  159. package/deps/capstone/arch/RISCV/RISCVMappingInsn.inc +1635 -0
  160. package/deps/capstone/arch/RISCV/RISCVModule.c +42 -0
  161. package/deps/capstone/arch/RISCV/RISCVModule.h +12 -0
  162. package/deps/capstone/arch/SH/SHDisassembler.c +2221 -0
  163. package/deps/capstone/arch/SH/SHDisassembler.h +19 -0
  164. package/deps/capstone/arch/SH/SHInsnTable.inc +66 -0
  165. package/deps/capstone/arch/SH/SHInstPrinter.c +438 -0
  166. package/deps/capstone/arch/SH/SHInstPrinter.h +23 -0
  167. package/deps/capstone/arch/SH/SHModule.c +39 -0
  168. package/deps/capstone/arch/SH/SHModule.h +12 -0
  169. package/deps/capstone/arch/SH/mktable.rb +390 -0
  170. package/deps/capstone/arch/Sparc/Sparc.h +63 -0
  171. package/deps/capstone/arch/Sparc/SparcDisassembler.c +500 -0
  172. package/deps/capstone/arch/Sparc/SparcDisassembler.h +17 -0
  173. package/deps/capstone/arch/Sparc/SparcGenAsmWriter.inc +5709 -0
  174. package/deps/capstone/arch/Sparc/SparcGenDisassemblerTables.inc +2028 -0
  175. package/deps/capstone/arch/Sparc/SparcGenInstrInfo.inc +514 -0
  176. package/deps/capstone/arch/Sparc/SparcGenRegisterInfo.inc +451 -0
  177. package/deps/capstone/arch/Sparc/SparcGenSubtargetInfo.inc +27 -0
  178. package/deps/capstone/arch/Sparc/SparcInstPrinter.c +446 -0
  179. package/deps/capstone/arch/Sparc/SparcInstPrinter.h +17 -0
  180. package/deps/capstone/arch/Sparc/SparcMapping.c +665 -0
  181. package/deps/capstone/arch/Sparc/SparcMapping.h +34 -0
  182. package/deps/capstone/arch/Sparc/SparcMappingInsn.inc +2643 -0
  183. package/deps/capstone/arch/Sparc/SparcModule.c +45 -0
  184. package/deps/capstone/arch/Sparc/SparcModule.h +12 -0
  185. package/deps/capstone/arch/SystemZ/SystemZDisassembler.c +484 -0
  186. package/deps/capstone/arch/SystemZ/SystemZDisassembler.h +17 -0
  187. package/deps/capstone/arch/SystemZ/SystemZGenAsmWriter.inc +11575 -0
  188. package/deps/capstone/arch/SystemZ/SystemZGenDisassemblerTables.inc +10262 -0
  189. package/deps/capstone/arch/SystemZ/SystemZGenInsnNameMaps.inc +2348 -0
  190. package/deps/capstone/arch/SystemZ/SystemZGenInstrInfo.inc +2820 -0
  191. package/deps/capstone/arch/SystemZ/SystemZGenRegisterInfo.inc +741 -0
  192. package/deps/capstone/arch/SystemZ/SystemZGenSubtargetInfo.inc +49 -0
  193. package/deps/capstone/arch/SystemZ/SystemZInstPrinter.c +433 -0
  194. package/deps/capstone/arch/SystemZ/SystemZInstPrinter.h +15 -0
  195. package/deps/capstone/arch/SystemZ/SystemZMCTargetDesc.c +195 -0
  196. package/deps/capstone/arch/SystemZ/SystemZMCTargetDesc.h +51 -0
  197. package/deps/capstone/arch/SystemZ/SystemZMapping.c +479 -0
  198. package/deps/capstone/arch/SystemZ/SystemZMapping.h +23 -0
  199. package/deps/capstone/arch/SystemZ/SystemZMappingInsn.inc +14175 -0
  200. package/deps/capstone/arch/SystemZ/SystemZModule.c +44 -0
  201. package/deps/capstone/arch/SystemZ/SystemZModule.h +12 -0
  202. package/deps/capstone/arch/TMS320C64x/TMS320C64xDisassembler.c +628 -0
  203. package/deps/capstone/arch/TMS320C64x/TMS320C64xDisassembler.h +19 -0
  204. package/deps/capstone/arch/TMS320C64x/TMS320C64xGenAsmWriter.inc +684 -0
  205. package/deps/capstone/arch/TMS320C64x/TMS320C64xGenDisassemblerTables.inc +1352 -0
  206. package/deps/capstone/arch/TMS320C64x/TMS320C64xGenInstrInfo.inc +298 -0
  207. package/deps/capstone/arch/TMS320C64x/TMS320C64xGenRegisterInfo.inc +277 -0
  208. package/deps/capstone/arch/TMS320C64x/TMS320C64xInstPrinter.c +572 -0
  209. package/deps/capstone/arch/TMS320C64x/TMS320C64xInstPrinter.h +15 -0
  210. package/deps/capstone/arch/TMS320C64x/TMS320C64xMapping.c +1926 -0
  211. package/deps/capstone/arch/TMS320C64x/TMS320C64xMapping.h +26 -0
  212. package/deps/capstone/arch/TMS320C64x/TMS320C64xModule.c +39 -0
  213. package/deps/capstone/arch/TMS320C64x/TMS320C64xModule.h +12 -0
  214. package/deps/capstone/arch/TriCore/TriCore.td +134 -0
  215. package/deps/capstone/arch/TriCore/TriCoreCallingConv.td +61 -0
  216. package/deps/capstone/arch/TriCore/TriCoreDisassembler.c +1655 -0
  217. package/deps/capstone/arch/TriCore/TriCoreDisassembler.h +18 -0
  218. package/deps/capstone/arch/TriCore/TriCoreGenAsmWriter.inc +3691 -0
  219. package/deps/capstone/arch/TriCore/TriCoreGenCSFeatureName.inc +22 -0
  220. package/deps/capstone/arch/TriCore/TriCoreGenCSMappingInsn.inc +8938 -0
  221. package/deps/capstone/arch/TriCore/TriCoreGenCSMappingInsnName.inc +404 -0
  222. package/deps/capstone/arch/TriCore/TriCoreGenCSMappingInsnOp.inc +7994 -0
  223. package/deps/capstone/arch/TriCore/TriCoreGenCSOpGroup.inc +32 -0
  224. package/deps/capstone/arch/TriCore/TriCoreGenDisassemblerTables.inc +4044 -0
  225. package/deps/capstone/arch/TriCore/TriCoreGenInstrInfo.inc +2693 -0
  226. package/deps/capstone/arch/TriCore/TriCoreGenRegisterInfo.inc +295 -0
  227. package/deps/capstone/arch/TriCore/TriCoreGenSubtargetInfo.inc +40 -0
  228. package/deps/capstone/arch/TriCore/TriCoreInstPrinter.c +488 -0
  229. package/deps/capstone/arch/TriCore/TriCoreInstrFormats.td +773 -0
  230. package/deps/capstone/arch/TriCore/TriCoreInstrInfo.td +1873 -0
  231. package/deps/capstone/arch/TriCore/TriCoreLinkage.h +21 -0
  232. package/deps/capstone/arch/TriCore/TriCoreMapping.c +241 -0
  233. package/deps/capstone/arch/TriCore/TriCoreMapping.h +32 -0
  234. package/deps/capstone/arch/TriCore/TriCoreModule.c +44 -0
  235. package/deps/capstone/arch/TriCore/TriCoreModule.h +11 -0
  236. package/deps/capstone/arch/TriCore/TriCoreRegisterInfo.td +153 -0
  237. package/deps/capstone/arch/WASM/WASMDisassembler.c +1009 -0
  238. package/deps/capstone/arch/WASM/WASMDisassembler.h +12 -0
  239. package/deps/capstone/arch/WASM/WASMInstPrinter.c +47 -0
  240. package/deps/capstone/arch/WASM/WASMInstPrinter.h +18 -0
  241. package/deps/capstone/arch/WASM/WASMMapping.c +333 -0
  242. package/deps/capstone/arch/WASM/WASMMapping.h +9 -0
  243. package/deps/capstone/arch/WASM/WASMModule.c +33 -0
  244. package/deps/capstone/arch/WASM/WASMModule.h +12 -0
  245. package/deps/capstone/arch/X86/X86ATTInstPrinter.c +997 -0
  246. package/deps/capstone/arch/X86/X86BaseInfo.h +50 -0
  247. package/deps/capstone/arch/X86/X86Disassembler.c +1033 -0
  248. package/deps/capstone/arch/X86/X86Disassembler.h +28 -0
  249. package/deps/capstone/arch/X86/X86DisassemblerDecoder.c +2358 -0
  250. package/deps/capstone/arch/X86/X86DisassemblerDecoder.h +725 -0
  251. package/deps/capstone/arch/X86/X86DisassemblerDecoderCommon.h +483 -0
  252. package/deps/capstone/arch/X86/X86GenAsmWriter.inc +49199 -0
  253. package/deps/capstone/arch/X86/X86GenAsmWriter1.inc +33196 -0
  254. package/deps/capstone/arch/X86/X86GenAsmWriter1_reduce.inc +2531 -0
  255. package/deps/capstone/arch/X86/X86GenAsmWriter_reduce.inc +2855 -0
  256. package/deps/capstone/arch/X86/X86GenDisassemblerTables.inc +112961 -0
  257. package/deps/capstone/arch/X86/X86GenDisassemblerTables2.inc +102151 -0
  258. package/deps/capstone/arch/X86/X86GenDisassemblerTables_reduce.inc +28047 -0
  259. package/deps/capstone/arch/X86/X86GenDisassemblerTables_reduce2.inc +18827 -0
  260. package/deps/capstone/arch/X86/X86GenInstrInfo.inc +15158 -0
  261. package/deps/capstone/arch/X86/X86GenInstrInfo_reduce.inc +1564 -0
  262. package/deps/capstone/arch/X86/X86GenRegisterInfo.inc +1549 -0
  263. package/deps/capstone/arch/X86/X86GenRegisterName.inc +292 -0
  264. package/deps/capstone/arch/X86/X86GenRegisterName1.inc +291 -0
  265. package/deps/capstone/arch/X86/X86ImmSize.inc +335 -0
  266. package/deps/capstone/arch/X86/X86InstPrinter.h +26 -0
  267. package/deps/capstone/arch/X86/X86InstPrinterCommon.c +116 -0
  268. package/deps/capstone/arch/X86/X86InstPrinterCommon.h +16 -0
  269. package/deps/capstone/arch/X86/X86IntelInstPrinter.c +1061 -0
  270. package/deps/capstone/arch/X86/X86Lookup16.inc +16874 -0
  271. package/deps/capstone/arch/X86/X86Lookup16_reduce.inc +2308 -0
  272. package/deps/capstone/arch/X86/X86Mapping.c +2266 -0
  273. package/deps/capstone/arch/X86/X86Mapping.h +96 -0
  274. package/deps/capstone/arch/X86/X86MappingInsn.inc +105977 -0
  275. package/deps/capstone/arch/X86/X86MappingInsnName.inc +1527 -0
  276. package/deps/capstone/arch/X86/X86MappingInsnName_reduce.inc +348 -0
  277. package/deps/capstone/arch/X86/X86MappingInsnOp.inc +75700 -0
  278. package/deps/capstone/arch/X86/X86MappingInsnOp_reduce.inc +7729 -0
  279. package/deps/capstone/arch/X86/X86MappingInsn_reduce.inc +10819 -0
  280. package/deps/capstone/arch/X86/X86MappingReg.inc +280 -0
  281. package/deps/capstone/arch/X86/X86Module.c +94 -0
  282. package/deps/capstone/arch/X86/X86Module.h +12 -0
  283. package/deps/capstone/arch/XCore/XCoreDisassembler.c +794 -0
  284. package/deps/capstone/arch/XCore/XCoreDisassembler.h +17 -0
  285. package/deps/capstone/arch/XCore/XCoreGenAsmWriter.inc +772 -0
  286. package/deps/capstone/arch/XCore/XCoreGenDisassemblerTables.inc +853 -0
  287. package/deps/capstone/arch/XCore/XCoreGenInstrInfo.inc +267 -0
  288. package/deps/capstone/arch/XCore/XCoreGenRegisterInfo.inc +110 -0
  289. package/deps/capstone/arch/XCore/XCoreInstPrinter.c +250 -0
  290. package/deps/capstone/arch/XCore/XCoreInstPrinter.h +18 -0
  291. package/deps/capstone/arch/XCore/XCoreMapping.c +297 -0
  292. package/deps/capstone/arch/XCore/XCoreMapping.h +26 -0
  293. package/deps/capstone/arch/XCore/XCoreMappingInsn.inc +1287 -0
  294. package/deps/capstone/arch/XCore/XCoreModule.c +41 -0
  295. package/deps/capstone/arch/XCore/XCoreModule.h +12 -0
  296. package/deps/capstone/cs.c +1664 -0
  297. package/deps/capstone/cs_priv.h +101 -0
  298. package/deps/capstone/cs_simple_types.h +886 -0
  299. package/deps/capstone/include/capstone/arm.h +991 -0
  300. package/deps/capstone/include/capstone/arm64.h +3159 -0
  301. package/deps/capstone/include/capstone/bpf.h +209 -0
  302. package/deps/capstone/include/capstone/capstone.h +875 -0
  303. package/deps/capstone/include/capstone/evm.h +188 -0
  304. package/deps/capstone/include/capstone/m680x.h +537 -0
  305. package/deps/capstone/include/capstone/m68k.h +613 -0
  306. package/deps/capstone/include/capstone/mips.h +956 -0
  307. package/deps/capstone/include/capstone/mos65xx.h +204 -0
  308. package/deps/capstone/include/capstone/platform.h +122 -0
  309. package/deps/capstone/include/capstone/ppc.h +2108 -0
  310. package/deps/capstone/include/capstone/riscv.h +531 -0
  311. package/deps/capstone/include/capstone/sh.h +465 -0
  312. package/deps/capstone/include/capstone/sparc.h +520 -0
  313. package/deps/capstone/include/capstone/systemz.h +2601 -0
  314. package/deps/capstone/include/capstone/tms320c64x.h +359 -0
  315. package/deps/capstone/include/capstone/tricore.h +567 -0
  316. package/deps/capstone/include/capstone/wasm.h +250 -0
  317. package/deps/capstone/include/capstone/x86.h +1986 -0
  318. package/deps/capstone/include/capstone/xcore.h +235 -0
  319. package/deps/capstone/include/platform.h +110 -0
  320. package/deps/capstone/include/windowsce/intrin.h +12 -0
  321. package/deps/capstone/include/windowsce/stdint.h +133 -0
  322. package/deps/capstone/utils.c +140 -0
  323. package/deps/capstone/utils.h +54 -0
  324. package/index.d.ts +448 -0
  325. package/index.js +64 -0
  326. package/index.mjs +25 -0
  327. package/package.json +82 -0
  328. package/prebuilds/win32-x64/hexcore-capstone.node +0 -0
  329. package/src/capstone_wrapper.cpp +910 -0
  330. package/src/capstone_wrapper.h +147 -0
  331. package/src/disasm_async_worker.h +215 -0
  332. package/src/main.cpp +145 -0
@@ -0,0 +1,21 @@
1
+ /* Capstone Disassembly Engine */
2
+ /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2019 */
3
+
4
+ #ifndef CS_TRICORE_LINKAGE_H
5
+ #define CS_TRICORE_LINKAGE_H
6
+
7
+ // Function defintions to call static LLVM functions.
8
+
9
+ #include "../../MCDisassembler.h"
10
+ #include "../../MCInst.h"
11
+ #include "../../MCRegisterInfo.h"
12
+ #include "../../SStream.h"
13
+ #include "capstone/capstone.h"
14
+
15
+ bool TriCore_LLVM_getInstruction(csh handle, const uint8_t *Bytes,
16
+ size_t ByteLen, MCInst *MI, uint16_t *Size,
17
+ uint64_t Address, void *Info);
18
+ const char *TriCore_LLVM_getRegisterName(unsigned RegNo);
19
+ void TriCore_LLVM_printInst(MCInst *MI, uint64_t Address, SStream *O);
20
+
21
+ #endif // CS_TRICORE_LINKAGE_H
@@ -0,0 +1,241 @@
1
+ /* Capstone Disassembly Engine */
2
+ /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
3
+
4
+ #ifdef CAPSTONE_HAS_TRICORE
5
+
6
+ #include <stdio.h> // debug
7
+ #include <string.h>
8
+ #include <assert.h>
9
+
10
+ #include "../../utils.h"
11
+ #include "../../cs_simple_types.h"
12
+
13
+ #include "TriCoreMapping.h"
14
+ #include "TriCoreLinkage.h"
15
+
16
+ #define GET_INSTRINFO_ENUM
17
+
18
+ #include "TriCoreGenInstrInfo.inc"
19
+
20
+ static const insn_map insns[] = {
21
+ // dummy item
22
+ { 0,
23
+ 0,
24
+ #ifndef CAPSTONE_DIET
25
+ { 0 },
26
+ { 0 },
27
+ { 0 },
28
+ 0,
29
+ 0
30
+ #endif
31
+ },
32
+
33
+ #include "TriCoreGenCSMappingInsn.inc"
34
+ };
35
+
36
+ void TriCore_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
37
+ {
38
+ // Not used. Information is set after disassembly.
39
+ }
40
+
41
+ #ifndef CAPSTONE_DIET
42
+ static const tricore_reg flag_regs[] = { TRICORE_REG_PSW };
43
+ #endif // CAPSTONE_DIET
44
+
45
+ static inline void check_updates_flags(MCInst *MI)
46
+ {
47
+ #ifndef CAPSTONE_DIET
48
+ if (!MI->flat_insn->detail)
49
+ return;
50
+ cs_detail *detail = MI->flat_insn->detail;
51
+ for (int i = 0; i < detail->regs_write_count; ++i) {
52
+ if (detail->regs_write[i] == 0)
53
+ return;
54
+ for (int j = 0; j < ARR_SIZE(flag_regs); ++j) {
55
+ if (detail->regs_write[i] == flag_regs[j]) {
56
+ detail->tricore.update_flags = true;
57
+ return;
58
+ }
59
+ }
60
+ }
61
+ #endif // CAPSTONE_DIET
62
+ }
63
+
64
+ void TriCore_set_instr_map_data(MCInst *MI)
65
+ {
66
+ map_cs_id(MI, insns, ARR_SIZE(insns));
67
+ map_implicit_reads(MI, insns);
68
+ map_implicit_writes(MI, insns);
69
+ check_updates_flags(MI);
70
+ map_groups(MI, insns);
71
+ }
72
+
73
+ #ifndef CAPSTONE_DIET
74
+
75
+ static const char * const insn_names[] = {
76
+ NULL,
77
+
78
+ #include "TriCoreGenCSMappingInsnName.inc"
79
+ };
80
+
81
+ // special alias insn
82
+ static const name_map alias_insn_names[] = { { 0, NULL } };
83
+ #endif
84
+
85
+ const char *TriCore_insn_name(csh handle, unsigned int id)
86
+ {
87
+ #ifndef CAPSTONE_DIET
88
+ unsigned int i;
89
+
90
+ if (id >= TRICORE_INS_ENDING)
91
+ return NULL;
92
+
93
+ // handle special alias first
94
+ for (i = 0; i < ARR_SIZE(alias_insn_names); i++) {
95
+ if (alias_insn_names[i].id == id)
96
+ return alias_insn_names[i].name;
97
+ }
98
+
99
+ return insn_names[id];
100
+ #else
101
+ return NULL;
102
+ #endif
103
+ }
104
+
105
+ #ifndef CAPSTONE_DIET
106
+ static const name_map group_name_maps[] = {
107
+ { TRICORE_GRP_INVALID, NULL },
108
+ { TRICORE_GRP_CALL, "call" },
109
+ { TRICORE_GRP_JUMP, "jump" },
110
+ };
111
+ #endif
112
+
113
+ const char *TriCore_group_name(csh handle, unsigned int id)
114
+ {
115
+ #ifndef CAPSTONE_DIET
116
+ if (id >= TRICORE_GRP_ENDING)
117
+ return NULL;
118
+
119
+ return group_name_maps[id].name;
120
+ #else
121
+ return NULL;
122
+ #endif
123
+ }
124
+
125
+ #ifndef CAPSTONE_DIET
126
+ /// A LLVM<->CS Mapping entry of an operand.
127
+ typedef struct insn_op {
128
+ uint8_t /* cs_op_type */ type; ///< Operand type (e.g.: reg, imm, mem)
129
+ uint8_t /* cs_ac_type */ access; ///< The access type (read, write)
130
+ uint8_t /* cs_data_type */
131
+ dtypes[10]; ///< List of op types. Terminated by CS_DATA_TYPE_LAST
132
+ } insn_op;
133
+
134
+ ///< Operands of an instruction.
135
+ typedef struct {
136
+ insn_op ops[16]; ///< NULL terminated array of operands.
137
+ } insn_ops;
138
+
139
+ const insn_ops insn_operands[] = {
140
+ #include "TriCoreGenCSMappingInsnOp.inc"
141
+ };
142
+ #endif
143
+
144
+ void TriCore_set_access(MCInst *MI)
145
+ {
146
+ #ifndef CAPSTONE_DIET
147
+ if (!(MI->csh->detail == CS_OPT_ON && MI->flat_insn->detail))
148
+ return;
149
+
150
+ assert(MI->Opcode < ARR_SIZE(insn_operands));
151
+
152
+ cs_detail *detail = MI->flat_insn->detail;
153
+ cs_tricore *tc = &(detail->tricore);
154
+ for (int i = 0; i < tc->op_count; ++i) {
155
+ cs_ac_type ac = map_get_op_access(MI, i);
156
+ cs_tricore_op *op = &tc->operands[i];
157
+ op->access = ac;
158
+ cs_op_type op_type = map_get_op_type(MI, i);
159
+ if (op_type != CS_OP_REG) {
160
+ continue;
161
+ }
162
+ if (ac & CS_AC_READ) {
163
+ detail->regs_read[detail->regs_read_count++] = op->reg;
164
+ }
165
+ if (ac & CS_AC_WRITE) {
166
+ detail->regs_write[detail->regs_write_count++] =
167
+ op->reg;
168
+ }
169
+ }
170
+ #endif
171
+ }
172
+
173
+ void TriCore_reg_access(const cs_insn *insn, cs_regs regs_read,
174
+ uint8_t *regs_read_count, cs_regs regs_write,
175
+ uint8_t *regs_write_count)
176
+ {
177
+ #ifndef CAPSTONE_DIET
178
+ uint8_t read_count, write_count;
179
+ cs_detail *detail = insn->detail;
180
+ read_count = detail->regs_read_count;
181
+ write_count = detail->regs_write_count;
182
+
183
+ // implicit registers
184
+ memcpy(regs_read, detail->regs_read,
185
+ read_count * sizeof(detail->regs_read[0]));
186
+ memcpy(regs_write, detail->regs_write,
187
+ write_count * sizeof(detail->regs_write[0]));
188
+
189
+ // explicit registers
190
+ cs_tricore *tc = &detail->tricore;
191
+ for (uint8_t i = 0; i < tc->op_count; i++) {
192
+ cs_tricore_op *op = &(tc->operands[i]);
193
+ switch ((int)op->type) {
194
+ case TRICORE_OP_REG:
195
+ if ((op->access & CS_AC_READ) &&
196
+ !arr_exist(regs_read, read_count, op->reg)) {
197
+ regs_read[read_count] = (uint16_t)op->reg;
198
+ read_count++;
199
+ }
200
+ if ((op->access & CS_AC_WRITE) &&
201
+ !arr_exist(regs_write, write_count, op->reg)) {
202
+ regs_write[write_count] = (uint16_t)op->reg;
203
+ write_count++;
204
+ }
205
+ break;
206
+ case TRICORE_OP_MEM:
207
+ // registers appeared in memory references always being read
208
+ if ((op->mem.base != ARM_REG_INVALID) &&
209
+ !arr_exist(regs_read, read_count, op->mem.base)) {
210
+ regs_read[read_count] = (uint16_t)op->mem.base;
211
+ read_count++;
212
+ }
213
+ default:
214
+ break;
215
+ }
216
+ }
217
+
218
+ *regs_read_count = read_count;
219
+ *regs_write_count = write_count;
220
+ #endif
221
+ }
222
+
223
+ bool TriCore_getInstruction(csh handle, const uint8_t *Bytes, size_t ByteLen,
224
+ MCInst *MI, uint16_t *Size, uint64_t Address,
225
+ void *Info)
226
+ {
227
+ return TriCore_LLVM_getInstruction(handle, Bytes, ByteLen, MI, Size,
228
+ Address, Info);
229
+ }
230
+
231
+ void TriCore_printInst(MCInst *MI, SStream *O, void *Info)
232
+ {
233
+ TriCore_LLVM_printInst(MI, MI->address, O);
234
+ }
235
+
236
+ const char *TriCore_getRegisterName(csh handle, unsigned int RegNo)
237
+ {
238
+ return TriCore_LLVM_getRegisterName(RegNo);
239
+ }
240
+
241
+ #endif // CAPSTONE_HAS_TRICORE
@@ -0,0 +1,32 @@
1
+ /* Capstone Disassembly Engine */
2
+ /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
3
+
4
+ #ifndef CS_TRICORE_MAP_H
5
+ #define CS_TRICORE_MAP_H
6
+
7
+ #include <capstone/capstone.h>
8
+
9
+ // given internal insn id, return public instruction info
10
+ void TriCore_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id);
11
+
12
+ const char *TriCore_insn_name(csh handle, unsigned int id);
13
+
14
+ const char *TriCore_group_name(csh handle, unsigned int id);
15
+
16
+ void TriCore_reg_access(const cs_insn *insn, cs_regs regs_read,
17
+ uint8_t *regs_read_count, cs_regs regs_write,
18
+ uint8_t *regs_write_count);
19
+
20
+ void TriCore_set_access(MCInst *MI);
21
+
22
+ void TriCore_set_instr_map_data(MCInst *MI);
23
+
24
+ bool TriCore_getInstruction(csh handle, const uint8_t *Bytes, size_t ByteLen,
25
+ MCInst *MI, uint16_t *Size, uint64_t Address,
26
+ void *Info);
27
+
28
+ void TriCore_printInst(MCInst *MI, SStream *O, void *Info);
29
+
30
+ const char *TriCore_getRegisterName(csh handle, unsigned int RegNo);
31
+
32
+ #endif
@@ -0,0 +1,44 @@
1
+ /* Capstone Disassembly Engine */
2
+ /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
3
+
4
+ #ifdef CAPSTONE_HAS_TRICORE
5
+
6
+ #include "../../utils.h"
7
+ #include "TriCoreMapping.h"
8
+ #include "TriCoreModule.h"
9
+ #include "TriCoreDisassembler.h"
10
+
11
+ cs_err TRICORE_global_init(cs_struct *ud)
12
+ {
13
+ MCRegisterInfo *mri;
14
+
15
+ mri = cs_mem_malloc(sizeof(*mri));
16
+
17
+ TriCore_init_mri(mri);
18
+ ud->printer = TriCore_printInst;
19
+ ud->printer_info = mri;
20
+ ud->getinsn_info = mri;
21
+ ud->disasm = TriCore_getInstruction;
22
+ ud->post_printer = NULL;
23
+
24
+ ud->reg_name = TriCore_getRegisterName;
25
+ ud->insn_id = TriCore_get_insn_id;
26
+ ud->insn_name = TriCore_insn_name;
27
+ ud->group_name = TriCore_group_name;
28
+
29
+ #ifndef CAPSTONE_DIET
30
+ ud->reg_access = TriCore_reg_access;
31
+ #endif
32
+
33
+ return CS_ERR_OK;
34
+ }
35
+
36
+ cs_err TRICORE_option(cs_struct *handle, cs_opt_type type, size_t value)
37
+ {
38
+ if (type == CS_OPT_SYNTAX)
39
+ handle->syntax = (int)value;
40
+
41
+ return CS_ERR_OK;
42
+ }
43
+
44
+ #endif
@@ -0,0 +1,11 @@
1
+ //
2
+ // Created by aya on 3/4/23.
3
+ //
4
+
5
+ #ifndef CAPSTONE_TRICODEMODULE_H
6
+ #define CAPSTONE_TRICODEMODULE_H
7
+
8
+ cs_err TRICORE_global_init(cs_struct *ud);
9
+ cs_err TRICORE_option(cs_struct *handle, cs_opt_type type, size_t value);
10
+
11
+ #endif // CAPSTONE_TRICODEMODULE_H
@@ -0,0 +1,153 @@
1
+ //==-- TriCoreRegisterInfo.td - TriCore Register defs ------*- tablegen -*-===//
2
+ //
3
+ // The LLVM Compiler Infrastructure
4
+ //
5
+ // This file is distributed under the University of Illinois Open Source
6
+ // License. See LICENSE.TXT for details.
7
+ //
8
+ //===----------------------------------------------------------------------===//
9
+
10
+ //===----------------------------------------------------------------------===//
11
+ // Declarations that describe the TriCore register file
12
+ //===----------------------------------------------------------------------===//
13
+
14
+ class TriCoreReg<string n, list<string> altNames = []> : Register<n, altNames> {
15
+ field bits<16> Num;
16
+ let Namespace = "TriCore";
17
+ let HWEncoding = Num;
18
+ }
19
+
20
+ // General Purpose Data Registers
21
+ class TriCoreDataReg<bits<16> num, string n, list<string> altNames = []> : TriCoreReg<n, altNames> {
22
+ let Num = num;
23
+ }
24
+
25
+ // General Purpose Address Registers
26
+ class TriCoreAddrReg<bits<16> num, string n, list<string> altNames = []> : TriCoreReg<n, altNames> {
27
+ let Num = num;
28
+ }
29
+
30
+ // Program Status Register
31
+ class TriCorePSReg<bits<16> num, string n, list<string> altNames = []> : TriCoreReg<n, altNames> {
32
+ let Num = num;
33
+ }
34
+
35
+ class TriCoreRegWithSubregs<bits<16> num, string n, list<Register> subregs>
36
+ : RegisterWithSubRegs<n, subregs> {
37
+ field bits<16> Num;
38
+
39
+ let Num = num;
40
+ let Namespace = "TriCore";
41
+ }
42
+
43
+ //===----------------------------------------------------------------------===//
44
+ //@Registers
45
+ //===----------------------------------------------------------------------===//
46
+ // The register string, such as "d0" or "d13" will show on "llvm-objdump -d"
47
+
48
+ def D0 : TriCoreDataReg<0, "d0">, DwarfRegNum<[0]>;
49
+ def D1 : TriCoreDataReg<1, "d1">, DwarfRegNum<[1]>;
50
+ def D2 : TriCoreDataReg<2, "d2">, DwarfRegNum<[2]>;
51
+ def D3 : TriCoreDataReg<3, "d3">, DwarfRegNum<[3]>;
52
+ def D4 : TriCoreDataReg<4, "d4">, DwarfRegNum<[4]>;
53
+ def D5 : TriCoreDataReg<5, "d5">, DwarfRegNum<[5]>;
54
+ def D6 : TriCoreDataReg<6, "d6">, DwarfRegNum<[6]>;
55
+ def D7 : TriCoreDataReg<7, "d7">, DwarfRegNum<[7]>;
56
+ def D8 : TriCoreDataReg<8, "d8">, DwarfRegNum<[8]>;
57
+ def D9 : TriCoreDataReg<9, "d9">, DwarfRegNum<[9]>;
58
+ def D10 : TriCoreDataReg<10, "d10">, DwarfRegNum<[10]>;
59
+ def D11 : TriCoreDataReg<11, "d11">, DwarfRegNum<[11]>;
60
+ def D12 : TriCoreDataReg<12, "d12">, DwarfRegNum<[12]>;
61
+ def D13 : TriCoreDataReg<13, "d13">, DwarfRegNum<[13]>;
62
+ def D14 : TriCoreDataReg<14, "d14">, DwarfRegNum<[14]>;
63
+ def D15 : TriCoreDataReg<15, "d15">, DwarfRegNum<[15]>;
64
+
65
+
66
+ def A0 : TriCoreAddrReg<0, "a0">, DwarfRegNum<[16]>;
67
+ def A1 : TriCoreAddrReg<1, "a1">, DwarfRegNum<[17]>;
68
+ def A2 : TriCoreAddrReg<2, "a2">, DwarfRegNum<[18]>;
69
+ def A3 : TriCoreAddrReg<3, "a3">, DwarfRegNum<[19]>;
70
+ def A4 : TriCoreAddrReg<4, "a4">, DwarfRegNum<[20]>;
71
+ def A5 : TriCoreAddrReg<5, "a5">, DwarfRegNum<[21]>;
72
+ def A6 : TriCoreAddrReg<6, "a6">, DwarfRegNum<[22]>;
73
+ def A7 : TriCoreAddrReg<7, "a7">, DwarfRegNum<[23]>;
74
+ def A8 : TriCoreAddrReg<8, "a8">, DwarfRegNum<[24]>;
75
+ def A9 : TriCoreAddrReg<9, "a9">, DwarfRegNum<[25]>;
76
+ def A10 : TriCoreAddrReg<10, "sp", ["a10"]>, DwarfRegNum<[26]>;
77
+ def A11 : TriCoreAddrReg<11, "a11">, DwarfRegNum<[27]>;
78
+ def A12 : TriCoreAddrReg<12, "a12">, DwarfRegNum<[28]>;
79
+ def A13 : TriCoreAddrReg<13, "a13">, DwarfRegNum<[29]>;
80
+ def A14 : TriCoreAddrReg<14, "a14">, DwarfRegNum<[30]>;
81
+ def A15 : TriCoreAddrReg<15, "a15">, DwarfRegNum<[31]>;
82
+
83
+ let Namespace = "TriCore" in {
84
+ def subreg_even : SubRegIndex<32>;
85
+ def subreg_odd : SubRegIndex<32, 32>;
86
+ }
87
+
88
+ //Extended 64-bit registers
89
+ let SubRegIndices = [subreg_even, subreg_odd] in {
90
+ def E0 : TriCoreRegWithSubregs<0, "e0", [D0,D1] >, DwarfRegNum<[32]>;
91
+ def E2 : TriCoreRegWithSubregs<2, "e2", [D2,D3] >, DwarfRegNum<[33]>;
92
+ def E4 : TriCoreRegWithSubregs<4, "e4", [D4,D5] >, DwarfRegNum<[34]>;
93
+ def E6 : TriCoreRegWithSubregs<6, "e6", [D6,D7] >, DwarfRegNum<[35]>;
94
+ def E8 : TriCoreRegWithSubregs<8, "e8", [D8,D9] >, DwarfRegNum<[36]>;
95
+ def E10 : TriCoreRegWithSubregs<10, "e10", [D10,D11] >, DwarfRegNum<[37]>;
96
+ def E12 : TriCoreRegWithSubregs<12, "e12", [D12,D13] >, DwarfRegNum<[38]>;
97
+ def E14 : TriCoreRegWithSubregs<14, "e14", [D14,D15] >, DwarfRegNum<[39]>;
98
+ }
99
+
100
+ let SubRegIndices = [subreg_even, subreg_odd] in {
101
+ def P0 : TriCoreRegWithSubregs<0, "p0", [A0,A1] >, DwarfRegNum<[40]>;
102
+ def P2 : TriCoreRegWithSubregs<2, "p2", [A2,A3] >, DwarfRegNum<[41]>;
103
+ def P4 : TriCoreRegWithSubregs<4, "p4", [A4,A5] >, DwarfRegNum<[42]>;
104
+ def P6 : TriCoreRegWithSubregs<6, "p6", [A6,A7] >, DwarfRegNum<[43]>;
105
+ def P8 : TriCoreRegWithSubregs<8, "p8", [A8,A9] >, DwarfRegNum<[44]>;
106
+ def P10 : TriCoreRegWithSubregs<10, "p10", [A10,A11] >, DwarfRegNum<[45]>;
107
+ def P12 : TriCoreRegWithSubregs<12, "p12", [A12,A13] >, DwarfRegNum<[46]>;
108
+ def P14 : TriCoreRegWithSubregs<14, "p14", [A14,A15] >, DwarfRegNum<[47]>;
109
+ }
110
+
111
+ //Program Status Information Registers
112
+ def PSW : TriCorePSReg<0, "psw">, DwarfRegNum<[40]>;
113
+ def PCXI : TriCorePSReg<1, "pcxi">, DwarfRegNum<[41]>;
114
+ def PC : TriCorePSReg<2, "pc">, DwarfRegNum<[42]>;
115
+ def FCX : TriCorePSReg<3, "fcx">, DwarfRegNum<[43]>;
116
+
117
+ //===----------------------------------------------------------------------===//
118
+ //@Register Classes
119
+ //===----------------------------------------------------------------------===//
120
+
121
+ def RD : RegisterClass<"TriCore", [i32], 32, (add
122
+ D0, D1, D2, D3, D4,
123
+ D5, D6, D7, D8, D9,
124
+ D10, D11, D12, D13, D14,
125
+ D15)>;
126
+
127
+ def RA : RegisterClass<"TriCore", [i32], 32, (add
128
+ A0, A1, A2, A3, A4,
129
+ A5, A6, A7, A8, A9,
130
+ A10, A11, A12, A13, A14,
131
+ A15)>;
132
+
133
+ def RE : RegisterClass<"TriCore", [i64], 64, (add
134
+ E0, E2, E4,
135
+ E6, E8, E10,
136
+ E12, E14)>;
137
+
138
+ def RP : RegisterClass<"TriCore", [i64], 64, (add
139
+ P0, P2, P4,
140
+ P6, P8, P10,
141
+ P12, P14)>;
142
+
143
+ def PSRegs : RegisterClass<"TriCore", [i32], 32, (add
144
+ PSW, PCXI, PC, FCX)>;
145
+
146
+ def TuplesPairAddrRegs : RegisterTuples<[subreg_even, subreg_odd],
147
+ [(add A0,A2,A4,A6,A8,A10,A12,A14),
148
+ (add A1,A3,A5,A7,A9,A11,A13,A15)]>;
149
+
150
+ def PairAddrRegs : RegisterClass<"TriCore", [i64], 64,
151
+ (add TuplesPairAddrRegs)> {
152
+ let Size = 64;
153
+ }