Optimize umask_get (make it a leaf function)

This commit is contained in:
2025-07-24 15:23:25 +02:00
parent c2535d9240
commit eb1c714127

View File

@@ -199,10 +199,12 @@ umask_set:
; rdi* syscall arg
; rdx* Stores umask for restoring+returning umask
umask_get:
mov rax, NR_umask
xor rdi, rdi
call umask_set
syscall
mov rdx, rax
mov rdi, rax
call umask_set
mov rax, NR_umask
syscall
mov rax, rdx
ret