xref: /reactos/sdk/lib/crt/math/libm_sse2/fm.inc (revision e5993f13)
1StackAllocate   MACRO size
2    if          size ne 0
3    sub         rsp, size
4    .ALLOCSTACK size
5    endif
6ENDM
7
8StackDeallocate   MACRO size
9    if          size ne 0
10    add         rsp, size
11    endif
12ENDM
13
14SaveReg         MACRO reg64, offset
15    mov         QWORD PTR [rsp+offset], reg64
16    .SAVEREG    reg64, offset
17ENDM
18
19RestoreReg      MACRO reg64, offset
20    mov         reg64, QWORD PTR [rsp+offset]
21ENDM
22
23SaveXmm         MACRO xmmreg, offset
24    movdqa      XMMWORD PTR [offset+rsp], xmmreg
25    .SAVEXMM128 xmmreg, offset
26ENDM
27
28RestoreXmm      MACRO xmmreg, offset
29    movdqa      xmmreg, XMMWORD PTR [offset+rsp]
30ENDM
31
32AVXSaveXmm      MACRO xmmreg, offset
33    vmovdqa     XMMWORD PTR [offset+rsp], xmmreg
34    .SAVEXMM128 xmmreg, offset
35ENDM
36
37AVXRestoreXmm   MACRO xmmreg, offset
38    vmovdqa     xmmreg, XMMWORD PTR [offset+rsp]
39ENDM
40