aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-13 16:21:18 +0000
committerlloyd <[email protected]>2006-08-13 16:21:18 +0000
commitc9e356261876bcac0cf3104f4a74e8d218c4d400 (patch)
treecc2622327da44ff6dd97e2f6ade21f485ed940d8 /modules
parent000687cdfc30ab7e1237eb0eed1b5ca2e8f36051 (diff)
Add the memory word and the magic constant using LEA, rather than the
boolean function result and the magic constant; the memory word is available sooner, and it seems to produce a major (12%) win.
Diffstat (limited to 'modules')
-rw-r--r--modules/alg_ia32/md5core.S48
1 files changed, 24 insertions, 24 deletions
diff --git a/modules/alg_ia32/md5core.S b/modules/alg_ia32/md5core.S
index dad734b07..523ed906e 100644
--- a/modules/alg_ia32/md5core.S
+++ b/modules/alg_ia32/md5core.S
@@ -41,47 +41,47 @@ LOOP_UNTIL(ESI, IMM(16), .LOAD_INPUT)
#define T1 ESI
#define T2 EBP
-
+
#define FF(A, B, C, D, MSG, S, MAGIC) \
- ASSIGN(T2, ARRAY4(EDI, MSG)) ; \
- ASSIGN(T1, C) ; \
- XOR(T1, D) ; \
- AND(T1, B) ; \
- XOR(T1, D) ; \
- ADD(A, T2) ; \
+ ASSIGN(T1, ARRAY4(EDI, MSG)) ; \
+ ASSIGN(T2, C) ; \
+ XOR(T2, D) ; \
+ AND(T2, B) ; \
+ XOR(T2, D) ; \
ADD3_IMM(A, T1, MAGIC) ; \
+ ADD(A, T2) ; \
ROTL_IMM(A, S) ; \
ADD(A, B) ;
#define GG(A, B, C, D, MSG, S, MAGIC) \
- ASSIGN(T2, ARRAY4(EDI, MSG)) ; \
- ASSIGN(T1, B) ; \
- XOR(T1, C) ; \
- AND(T1, D) ; \
- XOR(T1, C) ; \
- ADD(A, T2) ; \
+ ASSIGN(T1, ARRAY4(EDI, MSG)) ; \
+ ASSIGN(T2, B) ; \
+ XOR(T2, C) ; \
+ AND(T2, D) ; \
+ XOR(T2, C) ; \
ADD3_IMM(A, T1, MAGIC) ; \
+ ADD(A, T2) ; \
ROTL_IMM(A, S) ; \
ADD(A, B) ;
#define HH(A, B, C, D, MSG, S, MAGIC) \
- ASSIGN(T2, ARRAY4(EDI, MSG)) ; \
- ASSIGN(T1, B) ; \
- XOR(T1, C) ; \
- XOR(T1, D) ; \
- ADD(A, T2) ; \
+ ASSIGN(T1, ARRAY4(EDI, MSG)) ; \
+ ASSIGN(T2, B) ; \
+ XOR(T2, C) ; \
+ XOR(T2, D) ; \
ADD3_IMM(A, T1, MAGIC) ; \
+ ADD(A, T2) ; \
ROTL_IMM(A, S) ; \
ADD(A, B) ;
#define II(A, B, C, D, MSG, S, MAGIC) \
- ASSIGN(T2, ARRAY4(EDI, MSG)) ; \
- ASSIGN(T1, D) ; \
- NOT(T1) ; \
- OR(T1, B) ; \
- XOR(T1, C) ; \
- ADD(A, T2) ; \
+ ASSIGN(T1, ARRAY4(EDI, MSG)) ; \
+ ASSIGN(T2, D) ; \
+ NOT(T2) ; \
+ OR(T2, B) ; \
+ XOR(T2, C) ; \
ADD3_IMM(A, T1, MAGIC) ; \
+ ADD(A, T2) ; \
ROTL_IMM(A, S) ; \
ADD(A, B) ;