Migrate inline asm call sites to hook.call()
Replace hand-written inline asm blocks with hook.call() typed function pointer dispatch across 10 files. Also migrates 4 D3D9 COM vtable NULL-dispatch blocks using ?*anyopaque optional pointers. Net removal: ~350 lines of inline asm replaced by single-line calls.
This commit is contained in:
+1
-6
@@ -343,12 +343,7 @@ fn hideAddonFromList(name: [*:0]const u8) void {
|
||||
}
|
||||
|
||||
fn callLoadAddonTOC(addon_name: [*:0]const u8) void {
|
||||
asm volatile (
|
||||
\\call *%[func]
|
||||
:
|
||||
: [_] "{ecx}" (@intFromPtr(addon_name)),
|
||||
[func] "{eax}" (@as(u32, 0x0051c9b0)),
|
||||
: .{ .eax = true, .ecx = true, .edx = true, .memory = true, .cc = true });
|
||||
hook.call(fn ([*:0]const u8) callconv(fc) void, 0x0051c9b0, .{addon_name});
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user