Files
reactos/sdk/tools
Ahmed Arif 1ed6179ea8 [ASMPP] Improve MASM translation for Clang IAS (#8981)
* [ASMPP] Translate MASM NOT as bitwise complement

MASM NOT is a bitwise operator. Emitting C/GAS logical negation changes numeric constant values, for example X87XAM_BAD becomes 0 instead of 0xf800.

* [ASMPP] Support additional MASM expression operators

Map MASM expression operators through a single helper and add support for shr, eq, ne, lt, le, gt, and ge. This keeps existing and/or/shl/not handling while allowing expressions outside the instruction-token set.

* [ASMPP] Translate MASM if expressions

Handle plain MASM if through the expression translator so operators like ne are emitted as Clang/GAS syntax. Keep ifdef, ifndef, else, and endif on the existing directive path.

* [ASMPP] Handle RIP-relative numeric offsets

Keep constant +/- offsets before the emitted [rip] suffix so Clang IAS sees forms like symbol+4[rip] instead of the invalid symbol[rip]+4.

* [ASMPP] Balance FRAME procedure unwind directives

Clang IAS rejects .func/.endfunc and requires .seh_endproc or .cfi_endproc to match an active frame. Track whether each PROC line contains FRAME, including forms such as PROC PRIVATE FRAME, and emit the closing unwind directive only for framed procedures.

* [ASMPP] Simplify whitespace skipping for RIP offsets
2026-05-16 21:06:52 +00:00
..
2026-03-28 11:35:17 -07:00