mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-25 12:00:31 +00:00
Adds some NT functions (#1358)
This commit is contained in:
parent
12cb0669fb
commit
42a9ed0131
13 changed files with 195 additions and 0 deletions
19
libc/nt/kernel32/GetACP.S
Normal file
19
libc/nt/kernel32/GetACP.S
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GetACP,GetACP
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetACP:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
sub $32,%rsp
|
||||
call *__imp_GetACP(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GetACP,globl
|
||||
.previous
|
18
libc/nt/kernel32/GetCPInfoExW.S
Normal file
18
libc/nt/kernel32/GetCPInfoExW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GetCPInfoExW,GetCPInfoExW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetCPInfoEx:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_GetCPInfoExW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn GetCPInfoEx,globl
|
||||
.previous
|
18
libc/nt/kernel32/GetLogicalDriveStringsA.S
Normal file
18
libc/nt/kernel32/GetLogicalDriveStringsA.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GetLogicalDriveStringsA,GetLogicalDriveStringsA
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetLogicalDriveStringsA:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_GetLogicalDriveStringsA(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn GetLogicalDriveStringsA,globl
|
||||
.previous
|
19
libc/nt/kernel32/GetOEMCP.S
Normal file
19
libc/nt/kernel32/GetOEMCP.S
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GetOEMCP,GetOEMCP
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetOEMCP:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
sub $32,%rsp
|
||||
call *__imp_GetOEMCP(%rip)
|
||||
leave
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
#endif
|
||||
ret
|
||||
.endfn GetOEMCP,globl
|
||||
.previous
|
18
libc/nt/kernel32/GetShortPathNameW.S
Normal file
18
libc/nt/kernel32/GetShortPathNameW.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GetShortPathNameW,GetShortPathNameW
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetShortPathName:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_GetShortPathNameW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn GetShortPathName,globl
|
||||
.previous
|
Loading…
Add table
Add a link
Reference in a new issue