Clean up more WIN32 APIs

This commit is contained in:
Justine Tunney 2023-07-30 16:00:58 -07:00
parent 44b88d659d
commit 929478c524
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
60 changed files with 74 additions and 962 deletions

View file

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

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CloseHandle,CloseHandle
.text.windows
.ftrace1
__CloseHandle:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_CloseHandle(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __CloseHandle,globl
.previous

View file

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

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CreateFileMappingNumaW,CreateFileMappingNumaW
.text.windows
.ftrace1
__CreateFileMappingNuma:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_CreateFileMappingNumaW(%rip),%rax
jmp __sysv2nt8
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __CreateFileMappingNuma,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CreateFileMappingW,CreateFileMappingW
.text.windows
.ftrace1
__CreateFileMapping:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_CreateFileMappingW(%rip),%rax
jmp __sysv2nt6
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __CreateFileMapping,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CreateFileW,CreateFileW
.text.windows
.ftrace1
__CreateFile:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_CreateFileW(%rip),%rax
jmp __sysv2nt8
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __CreateFile,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CreateNamedPipeW,CreateNamedPipeW
.text.windows
.ftrace1
__CreateNamedPipe:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_CreateNamedPipeW(%rip),%rax
jmp __sysv2nt8
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __CreateNamedPipe,globl
.previous

View file

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

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CreateProcessW,CreateProcessW
.text.windows
.ftrace1
__CreateProcess:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_CreateProcessW(%rip),%rax
jmp __sysv2nt10
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __CreateProcess,globl
.previous

View file

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

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_CreateThread,CreateThread
.text.windows
.ftrace1
__CreateThread:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_CreateThread(%rip),%rax
jmp __sysv2nt6
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __CreateThread,globl
.previous

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_DeleteFileW,DeleteFileW
.text.windows
.ftrace1
__DeleteFile:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_DeleteFileW(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __DeleteFile,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_DeviceIoControl,DeviceIoControl
.text.windows
.ftrace1
__DeviceIoControl:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_DeviceIoControl(%rip),%rax
jmp __sysv2nt8
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __DeviceIoControl,globl
.previous

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_FindClose,FindClose
.text.windows
.ftrace1
__FindClose:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_FindClose(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __FindClose,globl
.previous

View file

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

View file

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

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_FlushFileBuffers,FlushFileBuffers
.text.windows
.ftrace1
__FlushFileBuffers:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_FlushFileBuffers(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __FlushFileBuffers,globl
.previous

View file

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

View file

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

View file

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

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_GetFileAttributesW,GetFileAttributesW
.text.windows
.ftrace1
__GetFileAttributes:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_GetFileAttributesW(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __GetFileAttributes,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_LockFileEx,LockFileEx
.text.windows
.ftrace1
__LockFileEx:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_LockFileEx(%rip),%rax
jmp __sysv2nt6
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __LockFileEx,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_MapViewOfFileEx,MapViewOfFileEx
.text.windows
.ftrace1
__MapViewOfFileEx:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_MapViewOfFileEx(%rip),%rax
jmp __sysv2nt6
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __MapViewOfFileEx,globl
.previous

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_MapViewOfFileExNuma,MapViewOfFileExNuma
.text.windows
.ftrace1
__MapViewOfFileExNuma:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_MapViewOfFileExNuma(%rip),%rax
jmp __sysv2nt8
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __MapViewOfFileExNuma,globl
.previous

View file

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

View file

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

View file

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

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_RemoveDirectoryW,RemoveDirectoryW
.text.windows
.ftrace1
__RemoveDirectory:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_RemoveDirectoryW(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __RemoveDirectory,globl
.previous

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_SetCurrentDirectoryW,SetCurrentDirectoryW
.text.windows
.ftrace1
__SetCurrentDirectory:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_SetCurrentDirectoryW(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __SetCurrentDirectory,globl
.previous

View file

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

View file

@ -1,18 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_UnlockFileEx,UnlockFileEx
.text.windows
.ftrace1
__UnlockFileEx:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov __imp_UnlockFileEx(%rip),%rax
jmp __sysv2nt6
#elif defined(__aarch64__)
mov x0,#0
ret
#endif
.endfn __UnlockFileEx,globl
.previous

View file

@ -1,20 +1,2 @@
#include "libc/nt/codegen.h"
.imp kernel32,__imp_UnmapViewOfFile,UnmapViewOfFile
.text.windows
.ftrace1
__UnmapViewOfFile:
.ftrace2
#ifdef __x86_64__
push %rbp
mov %rsp,%rbp
mov %rdi,%rcx
sub $32,%rsp
call *__imp_UnmapViewOfFile(%rip)
leave
#elif defined(__aarch64__)
mov x0,#0
#endif
ret
.endfn __UnmapViewOfFile,globl
.previous

View file

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

View file

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

View file

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