TianoCore EDK2 master
Loading...
Searching...
No Matches
PushPopRegsNasm.inc
1;------------------------------------------------------------------------------
2;
3; Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
4; SPDX-License-Identifier: BSD-2-Clause-Patent
5;
6; Abstract:
7;
8; Provide macro to push/pop registers in X64
9;
10;------------------------------------------------------------------------------
11
12;-----------------------------------------------------------------------------
13; Macro: PUSHA_64
14;
15; Description: Saves all registers on stack
16;
17; Input: None
18;
19; Output: None
20;-----------------------------------------------------------------------------
21%macro PUSHA_64 0
22 push r8
23 push r9
24 push r10
25 push r11
26 push r12
27 push r13
28 push r14
29 push r15
30 push rax
31 push rcx
32 push rdx
33 push rbx
34 push rsp
35 push rbp
36 push rsi
37 push rdi
38%endmacro
39
40;-----------------------------------------------------------------------------
41; Macro: POPA_64
42;
43; Description: Restores all registers from stack
44;
45; Input: None
46;
47; Output: None
48;-----------------------------------------------------------------------------
49%macro POPA_64 0
50 pop rdi
51 pop rsi
52 pop rbp
53 pop rsp
54 pop rbx
55 pop rdx
56 pop rcx
57 pop rax
58 pop r15
59 pop r14
60 pop r13
61 pop r12
62 pop r11
63 pop r10
64 pop r9
65 pop r8
66%endmacro
67
VOID EFIAPI Input(IN CHAR16 *Prompt OPTIONAL, OUT CHAR16 *InStr, IN UINTN StrLen)
Definition: EdbSupportUI.c:187