Giter Club home page Giter Club logo

fisk's Issues

Could you make this able to be installed?

I've written a lot of ruby (>15 years ago) but I've never dealt with building gems... (until now... my first attempt was for fisk). Tried to install fisk but ran into issues, as I did not get the gemspec right and the it did not get installed right. (was able to install all the prerequisites, include capstone dev, etc).

I modified the example so that it should work on Linux, but was not able to try it out...

Fisk would be perfect for a proof of concept prototype new language compiler I'm working on...

Register allocation needs to be done at the control-flow level

I think you need to do register allocation at the control-flow level, not the lexical instruction level.

For example your allocator will allocate this with just two registers, re-using r9 for both reg1 and reg3, but really reg1 is still alive.

reg1 = 1
reg2 = 1
head:
  goto break if reg1 > 100
  reg1 = reg1 + reg2
  reg3 = 1            # your register allocator thinks reg1 is dead at
                      # this point, so shares a register with reg3, but
                      # it's still alive - it's going to be used in the
                      # next iteration!
  reg2 = reg3
  goto head
break:
reg1 = fisk.register
fisk.mov reg1, fisk.imm32(1)
reg2 = fisk.register
fisk.mov reg2, fisk.imm32(1)
fisk.put_label(:head)
fisk.cmp reg1, fisk.imm32(100)
fisk.jg(fisk.label(:break))
fisk.add reg1, reg2
reg3 = fisk.register
fisk.mov reg3, fisk.imm32(1)
fisk.mov reg2, reg3
fisk.jmp(fisk.label(:head))
fisk.put_label(:break)
fisk.assign_registers([Fisk::Registers::R9, Fisk::Registers::R10])     # should fail!

Add support for REP instruction

I'm trying to encode the REP instruction, e.g. rep movsb, which, as far as I know, it's a valid x64 instruction.

I've checked the instructions list, but oddly, it's entirely missing, so I'm not sure if this is intentional.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.