提交 e59f992b 编写于 作者: A Andy Polyakov

Minor optimization in AES_set_encryption_key for x86_64.

上级 8bae7722
...@@ -1313,15 +1313,12 @@ AES_set_encrypt_key: ...@@ -1313,15 +1313,12 @@ AES_set_encrypt_key:
jmp .Lexit jmp .Lexit
.L10rounds: .L10rounds:
mov 0(%rsi),%eax # copy first 4 dwords mov 0(%rsi),%rax # copy first 4 dwords
mov 4(%rsi),%ebx mov 8(%rsi),%rdx
mov 8(%rsi),%ecx mov %rax,0(%rdi)
mov 12(%rsi),%edx mov %rdx,8(%rdi)
mov %eax,0(%rdi)
mov %ebx,4(%rdi)
mov %ecx,8(%rdi)
mov %edx,12(%rdi)
shr \$32,%rdx
xor %ecx,%ecx xor %ecx,%ecx
jmp .L10shortcut jmp .L10shortcut
.align 4 .align 4
...@@ -1349,19 +1346,14 @@ $code.=<<___; ...@@ -1349,19 +1346,14 @@ $code.=<<___;
jmp .Lexit jmp .Lexit
.L12rounds: .L12rounds:
mov 0(%rsi),%eax # copy first 6 dwords mov 0(%rsi),%rax # copy first 6 dwords
mov 4(%rsi),%ebx mov 8(%rsi),%rbx
mov 8(%rsi),%ecx mov 16(%rsi),%rdx
mov 12(%rsi),%edx mov %rax,0(%rdi)
mov %eax,0(%rdi) mov %rbx,8(%rdi)
mov %ebx,4(%rdi) mov %rdx,16(%rdi)
mov %ecx,8(%rdi)
mov %edx,12(%rdi) shr \$32,%rdx
mov 16(%rsi),%ecx
mov 20(%rsi),%edx
mov %ecx,16(%rdi)
mov %edx,20(%rdi)
xor %ecx,%ecx xor %ecx,%ecx
jmp .L12shortcut jmp .L12shortcut
.align 4 .align 4
...@@ -1397,30 +1389,23 @@ $code.=<<___; ...@@ -1397,30 +1389,23 @@ $code.=<<___;
jmp .Lexit jmp .Lexit
.L14rounds: .L14rounds:
mov 0(%rsi),%eax # copy first 8 dwords mov 0(%rsi),%rax # copy first 8 dwords
mov 4(%rsi),%ebx mov 8(%rsi),%rbx
mov 8(%rsi),%ecx mov 16(%rsi),%rcx
mov 12(%rsi),%edx mov 24(%rsi),%rdx
mov %eax,0(%rdi) mov %rax,0(%rdi)
mov %ebx,4(%rdi) mov %rbx,8(%rdi)
mov %ecx,8(%rdi) mov %rcx,16(%rdi)
mov %edx,12(%rdi) mov %rdx,24(%rdi)
mov 16(%rsi),%eax
mov 20(%rsi),%ebx shr \$32,%rdx
mov 24(%rsi),%ecx
mov 28(%rsi),%edx
mov %eax,16(%rdi)
mov %ebx,20(%rdi)
mov %ecx,24(%rdi)
mov %edx,28(%rdi)
xor %ecx,%ecx xor %ecx,%ecx
jmp .L14shortcut jmp .L14shortcut
.align 4 .align 4
.L14loop: .L14loop:
mov 0(%rdi),%eax # rk[0]
mov 28(%rdi),%edx # rk[4] mov 28(%rdi),%edx # rk[4]
.L14shortcut: .L14shortcut:
mov 0(%rdi),%eax # rk[0]
___ ___
&enckey (); &enckey ();
$code.=<<___; $code.=<<___;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册