mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-24 06:49:02 +00:00
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:
parent
4e44517c9c
commit
baad1df71d
33 changed files with 618 additions and 0 deletions
Makefile
libc/nt
BUILD.mk
gdi32
kernel32
master.shshell32
user32
AdjustWindowRectEx.SClientToScreen.SClipCursor.SCloseClipboard.SEmptyClipboard.SGetAsyncKeyState.SGetClipboardData.SGetMonitorInfoW.SGetRawInputData.SGetSystemMetrics.SMonitorFromPoint.SMonitorFromWindow.SOpenClipboard.SPostMessageW.SPtInRect.SRegisterRawInputDevices.SScreenToClient.SSetClipboardData.SSetCursorPos.SSetWindowLongPtrW.STrackMouseEvent.SUnregisterClassW.SWindowFromPoint.S
1
Makefile
1
Makefile
|
@ -449,6 +449,7 @@ COSMOPOLITAN = \
|
|||
LIBC_NT_BCRYPTPRIMITIVES \
|
||||
LIBC_NT_COMDLG32 \
|
||||
LIBC_NT_GDI32 \
|
||||
LIBC_NT_SHELL32 \
|
||||
LIBC_NT_IPHLPAPI \
|
||||
LIBC_NT_KERNEL32 \
|
||||
LIBC_NT_NTDLL \
|
||||
|
|
|
@ -91,6 +91,27 @@ $(LIBC_NT_COMDLG32_A).pkg: \
|
|||
|
||||
#───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
LIBC_NT_ARTIFACTS += LIBC_NT_SHELL32_A
|
||||
LIBC_NT_SHELL32 = $(LIBC_NT_SHELL32_A_DEPS) $(LIBC_NT_SHELL32_A)
|
||||
LIBC_NT_SHELL32_A = o/$(MODE)/libc/nt/shell32.a
|
||||
LIBC_NT_SHELL32_A_SRCS := $(wildcard libc/nt/shell32/*.S)
|
||||
LIBC_NT_SHELL32_A_OBJS = $(LIBC_NT_SHELL32_A_SRCS:%.S=o/$(MODE)/%.o)
|
||||
LIBC_NT_SHELL32_A_CHECKS = $(LIBC_NT_SHELL32_A).pkg
|
||||
LIBC_NT_SHELL32_A_DIRECTDEPS = LIBC_NT_KERNEL32
|
||||
LIBC_NT_SHELL32_A_DEPS := \
|
||||
$(call uniq,$(foreach x,$(LIBC_NT_SHELL32_A_DIRECTDEPS),$($(x))))
|
||||
|
||||
$(LIBC_NT_SHELL32_A): \
|
||||
libc/nt/shell32/ \
|
||||
$(LIBC_NT_SHELL32_A).pkg \
|
||||
$(LIBC_NT_SHELL32_A_OBJS)
|
||||
|
||||
$(LIBC_NT_SHELL32_A).pkg: \
|
||||
$(LIBC_NT_SHELL32_A_OBJS) \
|
||||
$(foreach x,$(LIBC_NT_SHELL32_A_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
#───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
LIBC_NT_ARTIFACTS += LIBC_NT_GDI32_A
|
||||
LIBC_NT_GDI32 = $(LIBC_NT_GDI32_A_DEPS) $(LIBC_NT_GDI32_A)
|
||||
LIBC_NT_GDI32_A = o/$(MODE)/libc/nt/gdi32.a
|
||||
|
|
18
libc/nt/gdi32/DescribePixelFormat.S
Normal file
18
libc/nt/gdi32/DescribePixelFormat.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp gdi32,__imp_DescribePixelFormat,DescribePixelFormat
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
DescribePixelFormat:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_DescribePixelFormat(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn DescribePixelFormat,globl
|
||||
.previous
|
20
libc/nt/kernel32/GlobalLock.S
Normal file
20
libc/nt/kernel32/GlobalLock.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GlobalLock,GlobalLock
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GlobalLock:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_GlobalLock(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GlobalLock,globl
|
||||
.previous
|
20
libc/nt/kernel32/GlobalUnlock.S
Normal file
20
libc/nt/kernel32/GlobalUnlock.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GlobalUnlock,GlobalUnlock
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GlobalUnlock:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_GlobalUnlock(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GlobalUnlock,globl
|
||||
.previous
|
|
@ -186,6 +186,8 @@ imp 'GetWindowsDirectoryA' GetWindowsDirectoryA kernel32 2
|
|||
imp 'GlobalAlloc' GlobalAlloc kernel32 2
|
||||
imp 'GlobalFree' GlobalFree kernel32 1
|
||||
imp 'GlobalMemoryStatusEx' GlobalMemoryStatusEx kernel32 1
|
||||
imp 'GlobalLock' GlobalLock kernel32 1
|
||||
imp 'GlobalUnlock' GlobalUnlock kernel32 1
|
||||
imp 'HeapAlloc' HeapAlloc kernel32 3
|
||||
imp 'HeapCompact' HeapCompact kernel32 2
|
||||
imp 'HeapCreate' HeapCreate kernel32 3
|
||||
|
@ -376,6 +378,7 @@ imp 'TraceSetInformation' TraceSetInformation advapi32 # Windows 7+
|
|||
#
|
||||
# Name Actual DLL Arity
|
||||
imp 'AdjustWindowRect' AdjustWindowRect user32 3
|
||||
imp 'AdjustWindowRectEx' AdjustWindowRectEx user32 4
|
||||
imp 'AnimateWindow' AnimateWindow user32 3
|
||||
imp 'AppendMenuA' AppendMenuA user32 4
|
||||
imp 'AppendMenu' AppendMenuW user32 4
|
||||
|
@ -383,6 +386,9 @@ imp 'BeginPaint' BeginPaint user32 2
|
|||
imp 'BringWindowToTop' BringWindowToTop user32 1
|
||||
imp 'CallNextHookEx' CallNextHookEx user32 4
|
||||
imp 'CloseWindow' CloseWindow user32 1
|
||||
imp 'ClientToScreen' ClientToScreen user32 2
|
||||
imp 'ClipCursor' ClipCursor user32 1
|
||||
imp 'CloseClipboard' CloseClipboard user32 0
|
||||
imp 'CreateIconIndirect' CreateIconIndirect user32 1
|
||||
imp 'CreateMenu' CreateMenu user32 0
|
||||
imp 'CreatePopupMenu' CreatePopupMenu user32 0
|
||||
|
@ -395,12 +401,15 @@ imp 'DestroyWindow' DestroyWindow user32 1
|
|||
imp 'DispatchMessage' DispatchMessageW user32 1
|
||||
imp 'DrawText' DrawTextW user32 5
|
||||
imp 'DrawTextEx' DrawTextExW user32 6
|
||||
imp 'EmptyClipboard' EmptyClipboard user32 0
|
||||
imp 'EndPaint' EndPaint user32 2
|
||||
imp 'EnumChildWindows' EnumChildWindows user32 3
|
||||
imp 'FillRect' FillRect user32 3
|
||||
imp 'FindWindow' FindWindowW user32 2
|
||||
imp 'FindWindowEx' FindWindowExW user32 4
|
||||
imp 'GetAsyncKeyState' GetAsyncKeyState user32 1
|
||||
imp 'GetClientRect' GetClientRect user32 2
|
||||
imp 'GetClipboardData' GetClipboardData user32 1
|
||||
imp 'GetCursor' GetCursor user32 0
|
||||
imp 'GetCursorPos' GetCursorPos user32 1
|
||||
imp 'GetDC' GetDC user32 1
|
||||
|
@ -409,9 +418,12 @@ imp 'GetKeyState' GetKeyState user32 1
|
|||
imp 'GetKeyboardLayout' GetKeyboardLayout user32 1
|
||||
imp 'GetMenu' GetMenu user32 1
|
||||
imp 'GetMessage' GetMessageW user32 4
|
||||
imp 'GetMonitorInfo' GetMonitorInfoW user32 2
|
||||
imp 'GetRawInputData' GetRawInputData user32 5
|
||||
imp 'GetParent' GetParent user32 1
|
||||
imp 'GetShellWindow' GetShellWindow user32 0
|
||||
imp 'GetSystemMenu' GetSystemMenu user32 2
|
||||
imp 'GetSystemMetrics' GetSystemMetrics user32 1
|
||||
imp 'GetWindow' GetWindow user32 2
|
||||
imp 'GetWindowPlacement' GetWindowPlacement user32 2
|
||||
imp 'GetWindowRect' GetWindowRect user32 2
|
||||
|
@ -432,13 +444,22 @@ imp 'MapVirtualKeyEx' MapVirtualKeyExW user32 3
|
|||
imp 'MessageBox' MessageBoxW user32 4
|
||||
imp 'MessageBoxEx' MessageBoxExW user32 5
|
||||
imp 'MoveWindow' MoveWindow user32 6
|
||||
imp 'MonitorFromPoint' MonitorFromPoint user32 2
|
||||
imp 'MonitorFromWindow' MonitorFromWindow user32 2
|
||||
imp 'OpenClipboard' OpenClipboard user32 1
|
||||
imp 'PeekMessage' PeekMessageW user32 5
|
||||
imp 'PostMessage' PostMessageW user32 4
|
||||
imp 'PostQuitMessage' PostQuitMessage user32 1
|
||||
imp 'PtInRect' PtInRect user32 2
|
||||
imp 'RedrawWindow' RedrawWindow user32 4
|
||||
imp 'RegisterClass' RegisterClassW user32 1
|
||||
imp 'RegisterClassEx' RegisterClassExW user32 1
|
||||
imp 'RegisterRawInputDevices' RegisterRawInputDevices user32 3
|
||||
imp 'ReleaseCapture' ReleaseCapture user32 0
|
||||
imp 'ReleaseDC' ReleaseDC user32 2
|
||||
imp 'ScreenToClient' ScreenToClient user32 2
|
||||
imp 'SetClipboardData' SetClipboardData user32 2
|
||||
imp 'SetCursorPos' SetCursorPos user32 2
|
||||
imp 'SendMessage' SendMessageW user32 4
|
||||
imp 'SetCapture' SetCapture user32 1
|
||||
imp 'SetClassLong' SetClassLongW user32 3
|
||||
|
@ -446,6 +467,7 @@ imp 'SetCursor' SetCursor user32 1
|
|||
imp 'SetParent' SetParent user32 2
|
||||
imp 'SetTimer' SetTimer user32 4
|
||||
imp 'SetWindowLong' SetWindowLongW user32 3
|
||||
imp 'SetWindowLongPtr' SetWindowLongPtrW user32 3
|
||||
imp 'SetWindowPlacement' SetWindowPlacement user32 2
|
||||
imp 'SetWindowPos' SetWindowPos user32 7
|
||||
imp 'SetWindowText' SetWindowTextW user32 2
|
||||
|
@ -454,12 +476,23 @@ imp 'SetWindowsHookEx' SetWindowsHookExW user32 4
|
|||
imp 'ShowCaret' ShowCaret user32 1
|
||||
imp 'ShowCursor' ShowCursor user32 1
|
||||
imp 'ShowWindow' ShowWindow user32 2
|
||||
imp 'TrackMouseEvent' TrackMouseEvent user32 1
|
||||
imp 'TrackPopupMenu' TrackPopupMenu user32 7
|
||||
imp 'TranslateMessage' TranslateMessage user32 1
|
||||
imp 'UnhookWindowsHook' UnhookWindowsHook user32 2
|
||||
imp 'UnhookWindowsHookEx' UnhookWindowsHookEx user32 1
|
||||
imp 'UnregisterClass' UnregisterClassW user32 2
|
||||
imp 'UpdateWindow' UpdateWindow user32 1
|
||||
imp 'WaitForInputIdle' WaitForInputIdle user32 2
|
||||
imp 'WindowFromPoint' WindowFromPoint user32 1
|
||||
|
||||
# SHELL32.DLL
|
||||
#
|
||||
# Name Actual DLL Arity
|
||||
imp 'CommandLineToArgv' CommandLineToArgvW shell32 2
|
||||
imp 'DragAcceptFiles' DragAcceptFiles shell32 2
|
||||
imp 'DragFinish' DragFinish shell32 1
|
||||
imp 'DragQueryFile' DragQueryFileW shell32 4
|
||||
|
||||
# GDI32.DLL
|
||||
#
|
||||
|
@ -473,6 +506,7 @@ imp 'CreateDIBSection' CreateDIBSection gdi32 6
|
|||
imp 'CreateRectRgn' CreateRectRgn gdi32 4
|
||||
imp 'DeleteDC' DeleteDC gdi32 1
|
||||
imp 'DeleteObject' DeleteObject gdi32 1
|
||||
imp 'DescribePixelFormat' DescribePixelFormat gdi32 4
|
||||
imp 'GetPixel' GetPixel gdi32 3
|
||||
imp 'RestoreDC' RestoreDC gdi32 2
|
||||
imp 'SaveDC' SaveDC gdi32 1
|
||||
|
|
18
libc/nt/shell32/CommandLineToArgvW.S
Normal file
18
libc/nt/shell32/CommandLineToArgvW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp shell32,__imp_CommandLineToArgvW,CommandLineToArgvW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
CommandLineToArgv:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_CommandLineToArgvW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn CommandLineToArgv,globl
|
||||
.previous
|
18
libc/nt/shell32/DragAcceptFiles.S
Normal file
18
libc/nt/shell32/DragAcceptFiles.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp shell32,__imp_DragAcceptFiles,DragAcceptFiles
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
DragAcceptFiles:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_DragAcceptFiles(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn DragAcceptFiles,globl
|
||||
.previous
|
20
libc/nt/shell32/DragFinish.S
Normal file
20
libc/nt/shell32/DragFinish.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp shell32,__imp_DragFinish,DragFinish
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
DragFinish:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_DragFinish(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn DragFinish,globl
|
||||
.previous
|
18
libc/nt/shell32/DragQueryFileW.S
Normal file
18
libc/nt/shell32/DragQueryFileW.S
Normal 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
|
18
libc/nt/user32/AdjustWindowRectEx.S
Normal file
18
libc/nt/user32/AdjustWindowRectEx.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_AdjustWindowRectEx,AdjustWindowRectEx
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
AdjustWindowRectEx:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_AdjustWindowRectEx(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn AdjustWindowRectEx,globl
|
||||
.previous
|
18
libc/nt/user32/ClientToScreen.S
Normal file
18
libc/nt/user32/ClientToScreen.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_ClientToScreen,ClientToScreen
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
ClientToScreen:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_ClientToScreen(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn ClientToScreen,globl
|
||||
.previous
|
20
libc/nt/user32/ClipCursor.S
Normal file
20
libc/nt/user32/ClipCursor.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_ClipCursor,ClipCursor
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
ClipCursor:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_ClipCursor(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn ClipCursor,globl
|
||||
.previous
|
19
libc/nt/user32/CloseClipboard.S
Normal file
19
libc/nt/user32/CloseClipboard.S
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_CloseClipboard,CloseClipboard
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
CloseClipboard:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
sub $32,%rsp
|
||||
call *__imp_CloseClipboard(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn CloseClipboard,globl
|
||||
.previous
|
19
libc/nt/user32/EmptyClipboard.S
Normal file
19
libc/nt/user32/EmptyClipboard.S
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_EmptyClipboard,EmptyClipboard
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
EmptyClipboard:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
sub $32,%rsp
|
||||
call *__imp_EmptyClipboard(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn EmptyClipboard,globl
|
||||
.previous
|
20
libc/nt/user32/GetAsyncKeyState.S
Normal file
20
libc/nt/user32/GetAsyncKeyState.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_GetAsyncKeyState,GetAsyncKeyState
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetAsyncKeyState:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_GetAsyncKeyState(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GetAsyncKeyState,globl
|
||||
.previous
|
20
libc/nt/user32/GetClipboardData.S
Normal file
20
libc/nt/user32/GetClipboardData.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_GetClipboardData,GetClipboardData
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetClipboardData:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_GetClipboardData(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GetClipboardData,globl
|
||||
.previous
|
18
libc/nt/user32/GetMonitorInfoW.S
Normal file
18
libc/nt/user32/GetMonitorInfoW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_GetMonitorInfoW,GetMonitorInfoW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetMonitorInfo:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_GetMonitorInfoW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn GetMonitorInfo,globl
|
||||
.previous
|
18
libc/nt/user32/GetRawInputData.S
Normal file
18
libc/nt/user32/GetRawInputData.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_GetRawInputData,GetRawInputData
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetRawInputData:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_GetRawInputData(%rip),%rax
|
||||
jmp __sysv2nt6
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn GetRawInputData,globl
|
||||
.previous
|
20
libc/nt/user32/GetSystemMetrics.S
Normal file
20
libc/nt/user32/GetSystemMetrics.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_GetSystemMetrics,GetSystemMetrics
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetSystemMetrics:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_GetSystemMetrics(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GetSystemMetrics,globl
|
||||
.previous
|
18
libc/nt/user32/MonitorFromPoint.S
Normal file
18
libc/nt/user32/MonitorFromPoint.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_MonitorFromPoint,MonitorFromPoint
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
MonitorFromPoint:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_MonitorFromPoint(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn MonitorFromPoint,globl
|
||||
.previous
|
18
libc/nt/user32/MonitorFromWindow.S
Normal file
18
libc/nt/user32/MonitorFromWindow.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_MonitorFromWindow,MonitorFromWindow
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
MonitorFromWindow:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_MonitorFromWindow(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn MonitorFromWindow,globl
|
||||
.previous
|
20
libc/nt/user32/OpenClipboard.S
Normal file
20
libc/nt/user32/OpenClipboard.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_OpenClipboard,OpenClipboard
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
OpenClipboard:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_OpenClipboard(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn OpenClipboard,globl
|
||||
.previous
|
18
libc/nt/user32/PostMessageW.S
Normal file
18
libc/nt/user32/PostMessageW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_PostMessageW,PostMessageW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
PostMessage:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_PostMessageW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn PostMessage,globl
|
||||
.previous
|
18
libc/nt/user32/PtInRect.S
Normal file
18
libc/nt/user32/PtInRect.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_PtInRect,PtInRect
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
PtInRect:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_PtInRect(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn PtInRect,globl
|
||||
.previous
|
18
libc/nt/user32/RegisterRawInputDevices.S
Normal file
18
libc/nt/user32/RegisterRawInputDevices.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_RegisterRawInputDevices,RegisterRawInputDevices
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
RegisterRawInputDevices:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_RegisterRawInputDevices(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn RegisterRawInputDevices,globl
|
||||
.previous
|
18
libc/nt/user32/ScreenToClient.S
Normal file
18
libc/nt/user32/ScreenToClient.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_ScreenToClient,ScreenToClient
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
ScreenToClient:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_ScreenToClient(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn ScreenToClient,globl
|
||||
.previous
|
18
libc/nt/user32/SetClipboardData.S
Normal file
18
libc/nt/user32/SetClipboardData.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_SetClipboardData,SetClipboardData
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
SetClipboardData:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_SetClipboardData(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn SetClipboardData,globl
|
||||
.previous
|
18
libc/nt/user32/SetCursorPos.S
Normal file
18
libc/nt/user32/SetCursorPos.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_SetCursorPos,SetCursorPos
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
SetCursorPos:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_SetCursorPos(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn SetCursorPos,globl
|
||||
.previous
|
18
libc/nt/user32/SetWindowLongPtrW.S
Normal file
18
libc/nt/user32/SetWindowLongPtrW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_SetWindowLongPtrW,SetWindowLongPtrW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
SetWindowLongPtr:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_SetWindowLongPtrW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn SetWindowLongPtr,globl
|
||||
.previous
|
20
libc/nt/user32/TrackMouseEvent.S
Normal file
20
libc/nt/user32/TrackMouseEvent.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_TrackMouseEvent,TrackMouseEvent
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
TrackMouseEvent:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_TrackMouseEvent(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn TrackMouseEvent,globl
|
||||
.previous
|
18
libc/nt/user32/UnregisterClassW.S
Normal file
18
libc/nt/user32/UnregisterClassW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_UnregisterClassW,UnregisterClassW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
UnregisterClass:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_UnregisterClassW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn UnregisterClass,globl
|
||||
.previous
|
20
libc/nt/user32/WindowFromPoint.S
Normal file
20
libc/nt/user32/WindowFromPoint.S
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp user32,__imp_WindowFromPoint,WindowFromPoint
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
WindowFromPoint:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_WindowFromPoint(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn WindowFromPoint,globl
|
||||
.previous
|
Loading…
Add table
Reference in a new issue