uxmal / reko

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

Feature: support x86 string intrinsics for segmented pointers. #1266

Closed uxmal closed 1 year ago

uxmal commented 1 year ago

This is a first take at making x86 string intrinsics available for real mode programs. There is one difference from the real mode implementation. When cx has the value 0, the memcpy and memcmp intrinsics should receive a value of 0x10000, instead of 0. I've solved this by injecting a cx == 0 ? 0x10000 : cx for the size. What do you think of the results? If this is too ugly I can abandon the effort.

uxmal commented 1 year ago

Merging. Thanks for the feedback!