Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: nss/lib/freebl/intel-gcm-x86-masm.asm

Issue 254213002: Fix bugs in intel-gcm-x86-masm.asm and re-enable the Intel AES assembly (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nss.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/freebl/intel-gcm-x86-masm.asm
diff --git a/nss/lib/freebl/intel-gcm-x86-masm.asm b/nss/lib/freebl/intel-gcm-x86-masm.asm
index d8ba9b4961cf26a073905d760111755efe6f7058..4767aa52d0a224b2c55b7740d7bbd3355d4aeecf 100644
--- a/nss/lib/freebl/intel-gcm-x86-masm.asm
+++ b/nss/lib/freebl/intel-gcm-x86-masm.asm
@@ -839,12 +839,13 @@ LEncDataTail:
vpxor TMP2, TMP2, TMP2
vmovdqa XMMWORD PTR[esp], TMP2
; copy as many bytes as needed
+ mov edi, edx
wtc 2014/04/30 02:00:50 The code below uses the 8-bit dl register (which i
xor KS, KS
@@:
cmp len, KS
je @f
- mov di, [PT + KS]
- mov [esp + KS], di
wtc 2014/04/30 02:00:50 Here we want to copy one byte at a time. Because o
agl 2014/04/30 17:38:11 I think this can be fixed with just: mov di, BYTE
wtc 2014/04/30 21:27:21 Thanks for the suggestion. MASM doesn't allow
+ mov dl, BYTE PTR[PT + KS]
+ mov BYTE PTR[esp + KS], dl
inc KS
jmp @b
@@:
@@ -854,8 +855,8 @@ LEncDataTail:
@@:
cmp len, KS
je @f
- mov di, [esp + KS]
- mov [CT + KS], di
+ mov dl, BYTE PTR[esp + KS]
+ mov BYTE PTR[CT + KS], dl
inc KS
jmp @b
@@:
@@ -865,6 +866,7 @@ LEncDataTail:
inc KS
jmp @b
@@:
+ mov edx, edi
wtc 2014/04/30 02:00:50 Here we restore the value of edx because we will u
vmovdqa TMP1, XMMWORD PTR[esp]
vpshufb TMP1, TMP1, XMMWORD PTR[Lbswap_mask]
@@ -1149,12 +1151,13 @@ LDecDataTail:
vaesenclast xmm7, TMP1, TMP2
; copy as many bytes as needed
+ mov edi, edx
xor KS, KS
@@:
cmp len, KS
je @f
- mov di, [CT + KS]
- mov [esp + KS], di
+ mov dl, BYTE PTR[CT + KS]
+ mov BYTE PTR[esp + KS], dl
inc KS
jmp @b
@@:
@@ -1165,6 +1168,7 @@ LDecDataTail:
jmp @b
@@:
+ mov edx, edi
wtc 2014/04/30 02:00:50 Here we restore the value of edx because we will u
vmovdqa TMP1, XMMWORD PTR[esp]
vpshufb TMP1, TMP1, XMMWORD PTR[Lbswap_mask]
vpxor TMP1, TMP1, T
@@ -1176,21 +1180,17 @@ LDecDataTail:
vpxor xmm7, xmm7, XMMWORD PTR[esp]
vmovdqa XMMWORD PTR[esp], xmm7
+ mov edi, edx
xor KS, KS
@@:
cmp len, KS
je @f
- mov di, [esp + KS]
- mov [PT + KS], di
- inc KS
- jmp @b
-@@:
- cmp KS, 16
- je @f
- mov BYTE PTR[PT + KS], 0
+ mov dl, BYTE PTR[esp + KS]
+ mov BYTE PTR[PT + KS], dl
inc KS
jmp @b
wtc 2014/04/30 02:00:50 This block of code seems to be a copy and paste er
@@:
+ mov edx, edi
LDecDataEnd:
« no previous file with comments | « nss.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698