From: Nguyen A. Q. <aq...@gm...> - 2018-03-16 14:08:15
|
wow, this is fantastic! do you want to send a pull req to add this into Capstone? if you do, please note that we only add new architectures into the "next" branch, so please base on "next" for the pull req. (there are some minor changes between "master" & "next", for example these 2 features are only available in "next": http://www.capstone-engine.org/op_access.html http://www.capstone-engine.org/mnemonic.html Thanks, Quynh http://www.keystone-engine.org http://www.capstone-engine.org http://www.unicorn-engine.org On Fri, Mar 16, 2018 at 9:16 PM Ben Horgan <ben...@ul...> wrote: > Thanks Quynh, I’ve add RISC-V support to my fork of the capstone > repository at https://github.com/benhorgan/capstone. Currently this just > supports RV32I with the M extension. I have not updated the bindings or the > msvc solution. There is a RISC-V test in the format of the other tests. I > have checked the output against gnu objdump and it matches. (jalr uses the > format currently used by the spec rather than objdump) > > > > The llvm based files were taken from: > https://github.com/lowRISC/riscv-llvm-integration at Latest commit > 74e4050 on 3 Oct 2017. This is based on llvm 5.0 and has not been taken > upstream so there will probably be more churn here. > > > > Groups used: > > > > GRP_JMP: jal, jalr, bne, bltu, blt, bgeu, bge, beq > > > > GRP_INT: ecall, ebreak > > > > GRP_LOAD_IMM: auipc, lui > > > > A GRP_LOAD_IMM instruction followed immediately by a jalr instruction can > be consided to make jump direct. > > > > Thanks, > > > > Ben > > > > *From:* Nguyen Anh Quynh [mailto:aq...@gm...] > *Sent:* 05 March 2018 13:14 > *To:* Capstone disassembly framework (www.capstone-engine.org) > *Subject:* Re: [Capstone-users] llvm tablegen files > > > > i used some adhoc scripts, but still modified that manually. > > > > you should look into existing tables to see how to do that yourself. > > > > > > > Thanks, > Quynh > > http://www.keystone-engine.org > http://www.capstone-engine.org > > http://www.unicorn-engine.org > > > > > > On Fri, Mar 2, 2018 at 2:29 AM, Ben Horgan <ben...@ul...> > wrote: > > Hi, > > > > I’m looking at how the tablegen files are used in capstone and was > wondering if there were any scripts for converting to the c output used by > capstone or if this is done by hand. The files are generated using command > lines of the form: > > ./bin/llvm-tblgen.exe -gen-subtarget -I=../include -I=../lib/Target/Mips > ../lib/Target/Mips/Mips.td >MipsGenSubTargetInfoBRH.inc > > > > This is towards doing something similar for RISC-V in capstone using the > https://github.com/lowRISC/riscv-llvm-integration repo. > > > > Thanks, > > > > Ben > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Capstone-users mailing list > Cap...@li... > https://lists.sourceforge.net/lists/listinfo/capstone-users > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Capstone-users mailing list > Cap...@li... > https://lists.sourceforge.net/lists/listinfo/capstone-users > |