cosmopolitan/libc/nt/psapi/EnumProcessModules.S
Justine Tunney cdf556e7d2
Implement signal handler tail recursion
GNU Make on Windows now appears to be working reliably. This change also
fixes a bug where, after fork the Windows thread handle wasn't reset and
that caused undefined behavior using SetThreadContext() with our signals
2023-10-14 10:38:15 -07:00

18 lines
348 B
ArmAsm

#include "libc/nt/codegen.h"
.imp psapi,__imp_EnumProcessModules,EnumProcessModules
.text.windows
.ftrace1
EnumProcessModules:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_EnumProcessModules(%rip),%rax
jmp __sysv2nt
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn EnumProcessModules,globl
.previous