Comments (2)
I'm interested in looking at this, as mkX64Disassembler
is proving to be a space bottleneck in large SAW proofs. I'm not sure if running mkX64Disassembler
at compile time is necessarily the way to go, however. I experimented with this on the rgs/compile-time-disassembly
branch, but that will cause GHC to eat up all of your memory before it can ever finish compiling Flexdis86.DefaultParser
.
An alternative approach that @travitch proposed is to build the disassembler table incrementally, one instruction at a time. Similar tricks have been used in pate
, but for initializing memory. It looks like the key function in flexdis86
which is responsible for table creation is mkOpcodeTable
:
flexdis86/src/Flexdis86/Disassembler.hs
Lines 415 to 450 in c19b55e
It's not entirely obvious at a first glance what the best approach is for making this incremental. For starters, the OpcodeTable
data type isn't just a flat Vector
, so it's unclear how to map opcodes to instructions cleanly:
flexdis86/src/Flexdis86/Disassembler.hs
Lines 171 to 181 in c19b55e
@travitch, do you have any thoughts on a possible design here?
from flexdis86.
Moving the discussion of parse table sizes to #40 because solving that is orthogonal to whether or not we compute the tables at compile time
from flexdis86.
Related Issues (17)
- GHC 8.8 support HOT 1
- Regression during ghc-8.8 update
- movslq instruction fails roundtrip tests HOT 1
- mov instruction fails roundtrip test HOT 2
- Roundtrip .text sections of sample binaries
- `push`'s operand should sign-extend immediate and segment-register operands HOT 2
- `utils/dump.sh`: Add option to accept AT&T syntax
- Move `binary-symbols` to another repo HOT 3
- Problem disassembling `fldt` instruction HOT 1
- The generated parse table consumes too much memory HOT 12
- `flexdis86` gives incorrect size to `xchg ax,ax`'s operands
- Support `notrack` prefixes HOT 1
- The `getPathToOptableXML` trick does not work in HLS
- Deprecate or remove NDS/DDS/NDS? HOT 1
- Missing: support `gs jne`
- Add support for endbr64 and endbr32
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 flexdis86.