mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 01:49:41 +00:00
Use PROC FRAME and prolog for MASM (GH #1116)
This commit is contained in:
parent
001227705a
commit
e6f1f81319
@ -141,12 +141,14 @@ OPTION EPILOGUE:NONE
|
||||
;; RCX (in): arg1, byte* buffer
|
||||
;; RDX (in): arg2, size_t bsize
|
||||
|
||||
MASM_RDRAND_GenerateBlock PROC ;; arg1:QWORD, arg2:QWORD
|
||||
MASM_RDRAND_GenerateBlock PROC FRAME ;; arg1:QWORD, arg2:QWORD
|
||||
|
||||
MWSIZE EQU 08h ;; machine word size
|
||||
buffer EQU rcx
|
||||
bsize EQU rdx
|
||||
|
||||
.endprolog
|
||||
|
||||
;; Top of While loop
|
||||
RDRAND_GenerateBlock_Top:
|
||||
|
||||
|
@ -141,12 +141,14 @@ OPTION EPILOGUE:NONE
|
||||
;; RCX (in): arg1, byte* buffer
|
||||
;; RDX (in): arg2, size_t bsize
|
||||
|
||||
MASM_RDSEED_GenerateBlock PROC ;; arg1:QWORD, arg2:QWORD
|
||||
MASM_RDSEED_GenerateBlock PROC FRAME ;; arg1:QWORD, arg2:QWORD
|
||||
|
||||
MWSIZE EQU 08h ;; machine word size
|
||||
buffer EQU rcx
|
||||
bsize EQU rdx
|
||||
|
||||
.endprolog
|
||||
|
||||
;; Top of While loop
|
||||
RDSEED_GenerateBlock_Top:
|
||||
|
||||
|
15
x64dll.asm
15
x64dll.asm
@ -1980,7 +1980,8 @@ SHA256_HashMultipleBlocks_SSE2 ENDP
|
||||
;; ctrl = rcx
|
||||
|
||||
ALIGN 8
|
||||
XGETBV64 PROC
|
||||
XGETBV64 PROC FRAME
|
||||
.endprolog
|
||||
;; query
|
||||
DB 0fh, 01h, 0d0h
|
||||
;; xcr = (EDX << 32) | EAX
|
||||
@ -1996,9 +1997,11 @@ XGETBV64 ENDP
|
||||
;; output = r8
|
||||
|
||||
ALIGN 8
|
||||
CPUID64 PROC
|
||||
CPUID64 PROC FRAME
|
||||
;; preserve per ABI
|
||||
mov r9, rbx
|
||||
mov [rsp+8], rbx
|
||||
.savereg rbx, 8
|
||||
.endprolog
|
||||
;; eax = func
|
||||
mov rax, rcx
|
||||
;; ecx = subfunc
|
||||
@ -2010,10 +2013,10 @@ CPUID64 PROC
|
||||
mov [r8+4], ebx
|
||||
mov [r8+8], ecx
|
||||
mov [r8+12], edx
|
||||
;; restore
|
||||
mov rbx, r9
|
||||
;; return
|
||||
;; return value
|
||||
mov rax, 1
|
||||
;; restore
|
||||
mov rbx, [rsp+8]
|
||||
ret
|
||||
CPUID64 ENDP
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user