BinaryAnalysisPlatform / qemu

Official QEMU mirror
Other
9 stars 12 forks source link

adds tracing for AArch64 #19

Closed thestr4ng3r closed 2 years ago

thestr4ng3r commented 2 years ago

Some parts of this code are shared with the 32-bit arm, specifically tracing of flags and conditions. For AArch64, we store operands only for the flags that are actually used, as opposed to existing arm code, which always dumps all of them unconditionally. To account for this change, loaded_cpsr and store_cpsr have been refactored to now be bitfields indicating the individual flags, rather than being just single booleans. Old code just sets them to TRACE_CPSR_ALL and can be made more fine-grained successively in the future if desired.

Example Trace: emulateme.arm64.frames.gz

bap-veri still has a few issues with this and generates many false errors, but the main reasons for this seem to be on the bap-veri side because of the structure of the generated BIL.

ivg commented 2 years ago

That's an incredible piece of work, thanks a lot! Concerning the bap-veri part, I hope to work on it today.