mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
touching whitespace in assembly routines being touched right now
This commit is contained in:
@@ -101,28 +101,23 @@ LAST:
|
||||
AES_CBC_encrypt ENDP
|
||||
|
||||
|
||||
|
||||
; /*
|
||||
; AES_CBC_decrypt[const ,unsigned char*in
|
||||
; unsigned ,char*out
|
||||
; unsigned ,char ivec+16
|
||||
; unsigned ,long length
|
||||
; const ,unsigned char*KS
|
||||
; int nr]
|
||||
; */
|
||||
; . globl AES_CBC_decrypt
|
||||
; void AES_CBC_decrypt(const unsigned char* in,
|
||||
; unsigned char* out,
|
||||
; unsigned char ivec[16],
|
||||
; unsigned long length,
|
||||
; const unsigned char* KS,
|
||||
; int nr)
|
||||
AES_CBC_decrypt PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
;# parameter 3: rdx
|
||||
;# parameter 4: rcx
|
||||
;# parameter 5: r8
|
||||
;# parameter 6: r9d
|
||||
; parameter 1: rdi
|
||||
; parameter 2: rsi
|
||||
; parameter 3: rdx
|
||||
; parameter 4: rcx
|
||||
; parameter 5: r8
|
||||
; parameter 6: r9d
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax, rdi
|
||||
mov r11, rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi, rcx
|
||||
mov rsi, rdx
|
||||
@@ -130,8 +125,8 @@ AES_CBC_decrypt PROC
|
||||
mov rcx,r9
|
||||
mov r8, [rsp+40]
|
||||
mov r9d, [rsp+48]
|
||||
|
||||
; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end
|
||||
; on microsoft xmm6-xmm15 are non volatile,
|
||||
; let's save on stack and restore at end
|
||||
sub rsp, 8+8*16 ; 8 = align stack , 8 xmm6-12,15 16 bytes each
|
||||
movdqa [rsp+0], xmm6
|
||||
movdqa [rsp+16], xmm7
|
||||
@@ -141,7 +136,6 @@ AES_CBC_decrypt PROC
|
||||
movdqa [rsp+80], xmm11
|
||||
movdqa [rsp+96], xmm12
|
||||
movdqa [rsp+112], xmm15
|
||||
|
||||
mov r10, rcx
|
||||
shr rcx, 4
|
||||
shl r10, 60
|
||||
@@ -171,7 +165,6 @@ DLOOP_4:
|
||||
pxor xmm1, xmm9
|
||||
pxor xmm2, xmm9
|
||||
pxor xmm3, xmm9
|
||||
|
||||
pxor xmm4, xmm9
|
||||
aesdec xmm1, xmm10
|
||||
aesdec xmm2, xmm10
|
||||
@@ -231,7 +224,6 @@ DLOOP_4:
|
||||
aesdec xmm3, xmm10
|
||||
aesdec xmm4, xmm10
|
||||
jb DLAST_4
|
||||
|
||||
movdqa xmm9, 192[r8]
|
||||
movdqa xmm10, 208[r8]
|
||||
movdqa xmm11, 224[r8]
|
||||
@@ -295,7 +287,6 @@ DLAST_4_2:
|
||||
pxor xmm1, xmm5
|
||||
movdqa xmm5, xmm15
|
||||
movdqu [rsi], xmm1
|
||||
|
||||
add rsi, 16
|
||||
dec r10
|
||||
jne DLOOP_4_2
|
||||
@@ -316,6 +307,7 @@ DEND_4:
|
||||
ret
|
||||
AES_CBC_decrypt ENDP
|
||||
|
||||
|
||||
; /*
|
||||
; AES_ECB_encrypt[const ,unsigned char*in
|
||||
; unsigned ,char*out
|
||||
|
@@ -134,7 +134,6 @@ movdqa 48(%r8), %xmm12
|
||||
pxor %xmm9, %xmm1
|
||||
pxor %xmm9, %xmm2
|
||||
pxor %xmm9, %xmm3
|
||||
|
||||
pxor %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
@@ -194,7 +193,6 @@ aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
jb DLAST_4
|
||||
|
||||
movdqa 192(%r8), %xmm9
|
||||
movdqa 208(%r8), %xmm10
|
||||
movdqa 224(%r8), %xmm11
|
||||
@@ -258,7 +256,6 @@ aesdeclast %xmm2, %xmm1
|
||||
pxor %xmm5, %xmm1
|
||||
movdqa %xmm15, %xmm5
|
||||
movdqu %xmm1, (%rsi)
|
||||
|
||||
addq $16, %rsi
|
||||
decq %r10
|
||||
jne DLOOP_4_2
|
||||
|
Reference in New Issue
Block a user