uxmal / reko

Reko is a binary decompiler.
https://uxmal.github.io/reko
GNU General Public License v2.0
2.1k stars 251 forks source link

Rewrite X86 string instructions as intrinsics (strlen, memcpy, memcmp) #1264

Closed ptomin closed 1 year ago

ptomin commented 1 year ago

Intrisics is better than loops. Currently 3 cases implemented:

rep movs -> memcpy
repe cmps -> memcmp
repne scasb (eax=0,ecx=0xFFFFFFFF) -> strlen

Segmented mode is not supported.

uxmal commented 1 year ago

Looks good! Thanks for the PR!