Giter Club home page Giter Club logo

ajs's People

Contributors

akruppa avatar alexjbest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

akruppa

ajs's Issues

Allow for dependencies on multiple lines.

For example

    add %rax,%rbx
    adc %rcx,%rdx
    add %r8,%r9
    ret

should also have a valid reordering with the 3rd line at the start, but currently this is not possible as there is a dependency chain.

Preserve labels

Make the output have original label names, as opposed to L1, L2, etc.
This will require changes to alexjbest/asmjit also

Cant compile on Ubuntu 16.10

g++ -c -I. -I/home/x/asmjit/src/ -I/home/x/sources/gmp-6.1.1/ -I/home/x/build/gmp-6.1.1/ -o line.o line.cpp -g -O2 --std=c++0x -Wall
In file included from line.cpp:2:0:
line.h:32:26: error: ‘kInstIdNone’ is not a member of ‘asmjit’
     Line(uint32_t inst = asmjit::kInstIdNone):
                          ^~~~~~
line.h: In constructor ‘Line::Line(uint32_t)’:
line.h:34:14: error: ‘noOperand’ is not a member of ‘asmjit’
         ops({asmjit::noOperand, asmjit::noOperand, asmjit::noOperand}),
              ^~~~~~
line.h:34:33: error: ‘noOperand’ is not a member of ‘asmjit’
         ops({asmjit::noOperand, asmjit::noOperand, asmjit::noOperand}),
                                 ^~~~~~
line.h:34:52: error: ‘noOperand’ is not a member of ‘asmjit’
         ops({asmjit::noOperand, asmjit::noOperand, asmjit::noOperand}),
                                                    ^~~~~~
line.h:41:46: error: invalid initializer for array member ‘asmjit::Operand Line::ops [4]’
         regsOut(std::vector<asmjit::X86Reg>()) {
                                              ^
line.cpp: In member function ‘int Line::isInstruction() const’:
line.cpp:59:25: error: ‘kInstIdNone’ is not a member of ‘asmjit’
   return instruction != asmjit::kInstIdNone;
                         ^~~~~~
line.cpp: In member function ‘int Line::isLabel() const’:
line.cpp:63:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   return label != -1;
          ~~~~~~^~~~~
line.cpp: In member function ‘void Line::setLabel(uint32_t)’:
line.cpp:94:17: error: ‘kInstIdNone’ is not a member of ‘asmjit’
   instruction = asmjit::kInstIdNone;
                 ^~~~~~
line.cpp: In member function ‘void Line::setAlign(uint8_t)’:
line.cpp:101:17: error: ‘kInstIdNone’ is not a member of ‘asmjit’
   instruction = asmjit::kInstIdNone;
                 ^~~~~~
line.cpp: In member function ‘void Line::setByte(uint8_t)’:
line.cpp:108:17: error: ‘kInstIdNone’ is not a member of ‘asmjit’
   instruction = asmjit::kInstIdNone;
                 ^~~~~~
line.cpp: In member function ‘void Line::addRegIn(asmjit::X86Reg)’:
line.cpp:122:11: error: ‘X86GpReg’ is not a member of ‘asmjit’
     reg = asmjit::X86GpReg(asmjit::kX86RegTypeGpq, reg.getRegIndex(), 8);
           ^~~~~~
line.cpp:122:28: error: ‘kX86RegTypeGpq’ is not a member of ‘asmjit’
     reg = asmjit::X86GpReg(asmjit::kX86RegTypeGpq, reg.getRegIndex(), 8);
                            ^~~~~~
line.cpp:122:56: error: ‘class asmjit::X86Reg’ has no member named ‘getRegIndex’
     reg = asmjit::X86GpReg(asmjit::kX86RegTypeGpq, reg.getRegIndex(), 8);
                                                        ^~~~~~~~~~~
line.cpp:125:11: error: ‘X86ZmmReg’ is not a member of ‘asmjit’
     reg = asmjit::X86ZmmReg(asmjit::kX86RegTypeZmm, reg.getRegIndex(), 64);
           ^~~~~~
line.cpp:125:29: error: ‘kX86RegTypeZmm’ is not a member of ‘asmjit’
     reg = asmjit::X86ZmmReg(asmjit::kX86RegTypeZmm, reg.getRegIndex(), 64);
                             ^~~~~~
line.cpp:125:57: error: ‘class asmjit::X86Reg’ has no member named ‘getRegIndex’
     reg = asmjit::X86ZmmReg(asmjit::kX86RegTypeZmm, reg.getRegIndex(), 64);
                                                         ^~~~~~~~~~~
line.cpp: In member function ‘void Line::addRegOut(asmjit::X86Reg)’:
line.cpp:132:11: error: ‘X86GpReg’ is not a member of ‘asmjit’
     reg = asmjit::X86GpReg(asmjit::kX86RegTypeGpq, reg.getRegIndex(), 8);
           ^~~~~~
line.cpp:132:28: error: ‘kX86RegTypeGpq’ is not a member of ‘asmjit’
     reg = asmjit::X86GpReg(asmjit::kX86RegTypeGpq, reg.getRegIndex(), 8);
                            ^~~~~~
line.cpp:132:56: error: ‘class asmjit::X86Reg’ has no member named ‘getRegIndex’
     reg = asmjit::X86GpReg(asmjit::kX86RegTypeGpq, reg.getRegIndex(), 8);
                                                        ^~~~~~~~~~~
line.cpp:135:11: error: ‘X86ZmmReg’ is not a member of ‘asmjit’
     reg = asmjit::X86ZmmReg(asmjit::kX86RegTypeZmm, reg.getRegIndex(), 64);
           ^~~~~~
line.cpp:135:29: error: ‘kX86RegTypeZmm’ is not a member of ‘asmjit’
     reg = asmjit::X86ZmmReg(asmjit::kX86RegTypeZmm, reg.getRegIndex(), 64);
                             ^~~~~~
line.cpp:135:57: error: ‘class asmjit::X86Reg’ has no member named ‘getRegIndex’
     reg = asmjit::X86ZmmReg(asmjit::kX86RegTypeZmm, reg.getRegIndex(), 64);
                                                         ^~~~~~~~~~~
Makefile:44: recipe for target 'line.o' failed
make: *** [line.o] Error 1

Add transforming swaps

I.e. inc %rax and mov (%rax),%rbx should be swappable, but with the second instruction changing.

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.