mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +00:00
Add VirtualAlloc2 WIN32 API
This commit is contained in:
parent
9ea64725b6
commit
06d916b449
3 changed files with 25 additions and 0 deletions
18
libc/nt/kernel32/VirtualAlloc2.S
Normal file
18
libc/nt/kernel32/VirtualAlloc2.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_VirtualAlloc2,VirtualAlloc2
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
VirtualAlloc2:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_VirtualAlloc2(%rip),%rax
|
||||
jmp __sysv2nt8
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn VirtualAlloc2,globl
|
||||
.previous
|
Loading…
Add table
Add a link
Reference in a new issue