Add several NT functions (#1318)

With these addtions, I could build and run a
[sokol](https://github.com/floooh/sokol) application (using OpenGL) on
both Linux and Windows.
This commit is contained in:
Bach Le 2024-10-28 12:10:32 +08:00 committed by GitHub
parent 4e44517c9c
commit baad1df71d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 618 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#include "libc/nt/codegen.h"
.imp shell32,__imp_DragQueryFileW,DragQueryFileW
.text.windows
.ftrace1
DragQueryFile:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_DragQueryFileW(%rip),%rax
jmp __sysv2nt
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn DragQueryFile,globl
.previous