Closed emmanuel099 closed 4 years ago
Two things need to happen here.
I can take a look at both of these this week. If you would like to try and tackle these, feel free.
I'm taking a look at your fork, and your new introduction of the barrier operation to handle mfence
, lfence
, and sfence
.
One of the things I strove for in Falcon IL is keeping the IL as minimalist as possible. I wanted implementation of analyses to have to consider as few cases as possible. Could these instructions instead be lifted to intrinsics, and handled specifically in your analysis? This would alleviate everyone from having to handle the, "Barrier," case.
Sorry for the late reply but I was very busy in the past few days.
If you would like to try and tackle these, feel free.
I'm working on it right now. :)
Tests need to pass.
Looks like these enumerators are only available since capstone 0.4.
Could these instructions instead be lifted to intrinsics, and handled specifically in your analysis?
Yes, definitely! Great idea.
After thinking about it again, lifting all the different fences/barriers to the same "Barrier" instruction isn't a good idea in general, as different analyses may handle them differently.
I'll open another PR for this.
Thanks for your review! Rebased my changes on top of master.
Handling endbr32/64 instructions fixes some lifting errors when loading binaries compiled with CET enabled.