aboutsummaryrefslogtreecommitdiffstats
path: root/steamvr/image-wait/trampoline.S
blob: 6c7dbc44479c38a86f7454c27c57364ef38ad68e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* SPDX-FileCopyrightText: 2026 Tomasz Kramkowski <tomasz@kramkow.ski>
 * SPDX-License-Identifier: CC0-1.0
 */

.intel_syntax noprefix
.section .text.entry,"ax",@progbits
.global input_wait
input_wait:
    push rdi
    push rsi
    push rdx
    push rcx
    sub rsp, 8
    call register_image_wait
    add rsp, 8
    pop rcx
    pop rdx
    pop rsi
    pop rdi

    # Replay the three displaced instructions, then resume the original function.
    push rbp
    mov rax, rsi
    mov r9d, edx
    jmp resume_transition
.section .note.GNU-stack,"",@progbits