Fix QEMU Plugin and add Instruction Address and Size Data; Make Branch Predictor Model Command-Line Parameter #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
x86_64
, we now have variable-width instruction encoding and the size of anMCInst
may not be known a prioriTypeId
declarations to QEMU plugin; without those, I gotany_cast
assertion errors between the shared library and the main executable (see this discussion I started a while ago on the LLVM forum)With these changes, I'm now able to run a hello world program via QEMU through MCAD. I had to disable the instruction cache modeling (
-enable-cache=false
on the command line) to make this work, or it didn't seem to terminate (maybe the cache model is very slow?)Interestingly, there seem to be many more branch mispredictions in this hello world example. Maybe it will be worth it to look into some more benchmarking of this after all.
The changes to the vivisect plugin with the new instruction size field should work, but I haven't tested them yet since we're probably not super interested in it any more now that we have QEMU.