Commit Graph
3 Commits
Author SHA1 Message Date
kbe 98c53568d9 task 3.5-3.6: x86 stdcall/thiscall/fastcall stub tests
Add 8 tests: stdcall (1 arg, 2 args no cleanup), thiscall (ecx+stack,
ecx only), fastcall (ecx+edx+stack, registers only), x64 not-implemented.
All existing stub code already handles these conventions correctly via
the switch in BuildX86Stub.

All passing (total: 83).
2026-07-21 19:50:49 +02:00
kbe f7236eea9b task 3.3-3.4: x86 cdecl stub encoding + CallingConvention enum
Add CallingConvention enum (Cdecl, Stdcall, Thiscall, Fastcall).
Implement BuildCallStub on StubAssembler with x86 cdecl support:
reverse arg push, call rel32, add esp (caller cleanup), ret.
x64 stub is a placeholder (task 3.7-3.8).

3 new tests: 0-arg (call+ret), 1-arg (push+call+cleanup+ret),
2-args (reverse push+call+cleanup+ret). Known byte expectations.
All passing (total: 67).
2026-07-21 19:37:20 +02:00
kbe 855595837f task 3.1-3.2: IAssembler interface + StubAssembler emit primitives
Add IAssembler seam (Assemble(text, origin)) with StubAssembler default
backend. StubAssembler provides EmitU8/EmitU32/EmitU64 little-endian
byte emitters (zero dep, no FASM). Assemble throws NotSupportedException
on StubAssembler (text assembly deferred to IcedAssembler, Phase 8).

7 new tests: EmitU8, EmitU32 x2, EmitU64 x2, IS-A check,
Assemble throws. All passing (total: 64).
2026-07-21 19:35:11 +02:00