Comments (8)
Thank you very much!
Would really appreciate if you could create PR once you are happy with your changes. Please add C test sources to test/smoke_test to verify the changes proposed. I'll be happy to pull the changes up to master.
from llvm-mctoll.
Btw what is the reason for that huge map? MCInst doesn't contain the width information?
from llvm-mctoll.
Btw what is the reason for that huge map? MCInst doesn't contain the width information?
Not at the time when I started the work. I did not see anything that indicates things have changed in that respect.
from llvm-mctoll.
Hmm odd how do they represent something like mov DWORD PTR [rbp-0x4], edi
then?
from llvm-mctoll.
INC on memory is tricky though: inc DWORD PTR [rsp+rax*4-0x38]
Fails in
llvm-mctoll/X86/X86MachineInstructionRaiser.cpp
Line 1571 in 64f0e14
Operand 6 is "Metadata", 7 is register.
If I add
if (MI.getOperand(SrcOpIndex).isMetadata())
++SrcOpIndex;
I get "Super register not found"
Any ideas?
from llvm-mctoll.
bool X86MachineInstructionRaiser::raiseMoveToMemInstr()
is implemented to raise an instruction that moves to memory the content of an explicit source register or immediate value. So, that function is not designed to raise INCXXm
instructions.
Support for INCXXm
instructions is not yet implemented. That said, take a look at bool X86MachineInstructionRaiser::raiseNotOpMemInstr()
. Basically that function generates an instruction to load from memory location, an operation (specifically, not
) instruction and an instruction to store to the memory location. This may be an opportunity to expand the class NOT_OP_MEM
(to say INPLACE_MEM_OP
) to raise instructions that load, operate and store.
from llvm-mctoll.
Btw what is the reason for that huge map? MCInst doesn't contain the width information?
Not at the time when I started the work. I did not see anything that indicates things have changed in that respect.
However, eventually, I really want to get rid of the burden of maintaining this table and replace its services using LLVM APIs or some other tblgen based utility.
from llvm-mctoll.
This may be an opportunity to expand the class
NOT_OP_MEM
(to sayINPLACE_MEM_OP
) to raise instructions that load, operate and store.
Thanks that helped! Trass3r@f100b2e
I really want to get rid of the burden of maintaining this table and replace its services using LLVM APIs or some other tblgen based utility.
I experimented a bit with that (see my repo) but I think it would require some refactoring of the raise functions into something more generic working on general a = b op c
instructions with common and transparent handling of reg/mem/imm operands.
from llvm-mctoll.
Related Issues (20)
- Wrong lift result for nested "for" loops. HOT 2
- Unable to raise arm binary containing an array HOT 3
- Adapt mctoll to use Opaque pointers HOT 1
- This repo is missing important files
- Unknown prototype for function : _ZNSaIcEC1Ev HOT 1
- Failing to lift binaries HOT 2
- TEST8rr instruction failing to lift properly HOT 1
- Failed to lift binary (core dumped) HOT 1
- Failed to lift simple ARM binary HOT 1
- Build without LLVM source? HOT 1
- Supported LLVM version HOT 1
- assert failed at X86FuncPrototypeDiscovery.cpp:227 HOT 2
- Does Mctoll Translator support Weak Memory Model Architectures ? HOT 1
- cannot compile mctoll without assertions HOT 7
- Error while lifting. HOT 6
- Error when lifting. HOT 1
- is this project still on-going? HOT 1
- i need to install llvm mctoll HOT 3
- generate invalid llir instructions HOT 4
- Cannot get step #4 to work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-mctoll.