BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.07k stars 273 forks source link

improves the setw function used by the aarch64 lifter #1454

Closed ivg closed 2 years ago

ivg commented 2 years ago

This macro assigns the lower 32 bits of the register. To prevent the desugaring pass from preserving the upper bits the destination register is first zeroed. This also requires let-bound the right-hand side for the case when it references the left-hand side. Altogether it resulted in ugly and inefficient code, albeit semantically correct.

A much more simple and direct approach is to assign directly to the base register.