Artifact a05b3cdd12778d15cd61568730de4070aa5f53e0ab93e9a3c48f60567bf8be38:
- File kmem/platform.mmap.fn.x86.lin.64.s — part of check-in [f85e6a07dd] at 2019-08-20 22:54:49 on branch trunk — reorganize posix assembly code (user: lexi, size: 768) [annotate] [blame] [check-ins using]
- File legacy/platform.mmap.fn.x86.lin.64.s — part of check-in [709ffb094d] at 2019-08-22 04:31:43 on branch trunk — finish moving heap allocation/free functions to the posix syscall apparatus and deprecate the direct assembly implementations of platform_mmap; update the kmem docs to match new function signatures (and remove typos) (user: lexi, size: 768) [annotate] [blame] [check-ins using]
- File mod/kmem/platform.mmap.fn.x86.lin.64.s — part of check-in [14172a910a] at 2019-08-21 06:00:24 on branch trunk — move modules to a subdirectory in order to keep the directory tree organized and make room for OS-specific build files (user: lexi, size: 768) [annotate] [blame] [check-ins using]
bits 64 %include "../arch/posix/x86.lin.64.s" %include "../arch/x86.cdecl.64.s" ; vim: ft=nasm global kmem_platform_mmap kmem_platform_mmap: ; to call mmap, we need to translate the cdecl64 ; register arguments to their appropriate syscall64 ; registers. these are mostly the same, with one ; obnoxious exception. the NOPs have been written ; in as comments to aid in understanding. mov sys.reg.1, ccall.reg.0 ;nop - rdi → rdi mov sys.reg.2, ccall.reg.1 ;nop - rsi → rsi mov sys.reg.3, ccall.reg.2 ;nop - rdx → rdx mov sys.reg.4, ccall.reg.3 ; OP - rcx → r10 mov sys.reg.5, ccall.reg.4 ;nop - r8 → r8 mov sys.reg.6, ccall.reg.5 ;nop - r9 → r9 mov sys.reg.0, sys.mmap sys.call mov ccall.reg.ret, sys.reg.ret ; rax → rdi ret