Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
5201 connectés 

 

Sujet(s) à lire :
    - Who's who@Programmation
 

 Mot :   Pseudo :  
  Aller à la page :
 
 Page :   1  2  3  4  5  ..  5044  5045  5046  ..  26992  26993  26994  26995  26996  26997
Auteur Sujet :

[blabla@olympe] Le topic du modo, dieu de la fibre et du monde

n°844314
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 07-09-2004 à 16:30:48  profilanswer
 

Reprise du message précédent :

skeye a écrit :

thales ils ont des bureaux partout, et il a dit pessac, pas mérignac!:o

rooo, mais ça va hein :o
pessac, mérignac, c'est pareil, ça finit par "ac" :o
comme la star'ac :o

mood
Publicité
Posté le 07-09-2004 à 16:30:48  profilanswer
 

n°844316
Profil sup​primé
Posté le 07-09-2004 à 16:32:11  answer
 

ou le cognac [:dawa]

n°844317
gfive
Posté le 07-09-2004 à 16:34:27  profilanswer
 


 
ou dans ton cuac.
Ah non, en fait.


---------------
Tous les sud africains sont ségrégationistes, à part Ted. (P. Desproges)
n°844318
skeye
Posté le 07-09-2004 à 16:37:01  profilanswer
 

Citation :


anomalies détectées


[:youpi]


---------------
Can't buy what I want because it's free -
n°844328
masklinn
í dag viðrar vel til loftárása
Posté le 07-09-2004 à 16:56:33  profilanswer
 

skeye a écrit :

Citation :


anomalies détectées


[:youpi]


Ca c'est du message d'erreur utile [:grinking]  
 
Figure 19: message d'erreur inutile


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°844329
skeye
Posté le 07-09-2004 à 16:57:29  profilanswer
 

Masklinn a écrit :

Ca c'est du message d'erreur utile [:grinking]  
 
Figure 19: message d'erreur inutile


J'ai un log ailleurs...et ça veut surtout dire que mon fichier ctl fonctionne...:o


---------------
Can't buy what I want because it's free -
n°844333
antp
Super Administrateur
Champion des excuses bidons
Posté le 07-09-2004 à 17:07:05  profilanswer
 

(préparez les "rofl" )
 
boulet du jour : antp
 
je sors de chez moi, je me dis "il fait trop chaud pour prendre une veste", je laisse la veste à l'intérieur, je claque la porte
[:totoz] mes clés étaient dans ma veste
 
heureusement que mes voisins étaient là
heureusement que la fenêtre du 3è étage était ouverte
heureusement que l'on peut marcher sur les goutières
heureusement que je n'ai pas trop le vertige :o

n°844335
masklinn
í dag viðrar vel til loftárása
Posté le 07-09-2004 à 17:09:24  profilanswer
 

antp a écrit :

(préparez les "rofl" )
 
boulet du jour : antp
 
je sors de chez moi, je me dis "il fait trop chaud pour prendre une veste", je laisse la veste à l'intérieur, je claque la porte
[:totoz] mes clés étaient dans ma veste
 
heureusement que mes voisins étaient là
heureusement que la fenêtre du 3è étage était ouverte
heureusement que l'on peut marcher sur les goutières
heureusement que je n'ai pas trop le vertige :o


erf, toi aussi t'as une porte qui se ferme toute seule et une tendance à oublier les choses sans importance telles que l'endroit ou t'as mis tes clés?
 [:totoz]  
Ben on est frêres [:grinking] (sauf de lunettes [:spamafote] )
 
Figure 20: Personne ayant oublié ses clés


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°844336
Profil sup​primé
Posté le 07-09-2004 à 17:09:32  answer
 

maislol
 
ste bouletage :lol:

n°844338
gfive
Posté le 07-09-2004 à 17:11:43  profilanswer
 

Allez, zou, j'me rentre, moi! :)  
J'ai assez glandé aujourd'hui.


---------------
Tous les sud africains sont ségrégationistes, à part Ted. (P. Desproges)
mood
Publicité
Posté le 07-09-2004 à 17:11:43  profilanswer
 

n°844340
skeye
Posté le 07-09-2004 à 17:15:20  profilanswer
 

antp a écrit :

(préparez les "rofl" )
 
boulet du jour : antp
 
je sors de chez moi, je me dis "il fait trop chaud pour prendre une veste", je laisse la veste à l'intérieur, je claque la porte
[:totoz] mes clés étaient dans ma veste
 
heureusement que mes voisins étaient là
heureusement que la fenêtre du 3è étage était ouverte
heureusement que l'on peut marcher sur les goutières
heureusement que je n'ai pas trop le vertige :o


[:ddr555]


---------------
Can't buy what I want because it's free -
n°844342
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 07-09-2004 à 17:20:42  profilanswer
 

koo koo [:dawa]
j'ai recodé mon md5 [:petrus75]

Code :
  1. %include "common.inc"
  2. ;%define LOOPS   2097152
  3. ;%define LOOPS   1000000
  4. ;%define UNROLL  8
  5. %define DO_P4                   1
  6. %if DO_P4
  7. %define USE_PSHUFD              0
  8. %define USE_PSHUFD_ROL          1               ; On P4's doing a PSHUFD is faster than a MOVDQA in some circumstances.
  9. %define CACHE_LINE_SIZE         64
  10. %else
  11. %define USE_PSHUFD              0
  12. %define USE_PSHUFD_ROL          0
  13. %define CACHE_LINE_SIZE         32
  14. %endif ; %if DO_P4
  15. %define PHASE1                  256
  16. %define PHASE2                  PHASE1 + 64
  17. %define S11 7
  18. %define S12 12
  19. %define S13 17
  20. %define S14 22
  21. %define S21 5
  22. %define S22 9
  23. %define S23 14
  24. %define S24 20
  25. %define S31 4
  26. %define S32 11
  27. %define S33 16
  28. %define S34 23
  29. %define S41 6
  30. %define S42 10
  31. %define S43 15
  32. %define S44 21
  33. ; the macros we will use assume the triple-blocks are in
  34. ; XMM0-XMM3 and EAX,EBX,ECX,EDX and the input block is accessed via EBP [e.g. 16 64-bit words and 16 32bit words]
  35. ; called as A,B,C,D,a,b,c,d,rot,text_index1,text_index2,sin_index,constant1,constant2,PHASE
  36. ;#define F(b, c, d) ((b & c) | (~b & d))
  37. ;#define F(b, c, d) (d ^ (b & (c ^ d)))
  38. ;  (a) += F ((b), (c), (d)) + (x) + (uns32)(ac); \
  39. ;  (a) = ROLuns32((a), (s)); \
  40. ;  (a) += (b);
  41. ;;   FF  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX,S11, 0, 0,0d76aa478h
  42. ;;   FF  XMM3,XMM0,XMM1,XMM2, EDX,EAX,EBX,ECX,S12, 1, 1,0e8c7b756h
  43. ;    Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  44. %macro Ff 18
  45. %define A               %1
  46. %define B               %2
  47. %define C               %3
  48. %define D               %4
  49. %define a               %5
  50. %define b               %6
  51. %define c               %7
  52. %define d               %8
  53. %define mmxrot          %9
  54. %define alurot1         %10
  55. %define alurot2         %11
  56. %define mmxtext_index   %12
  57. %define alutext_index1  %13
  58. %define alutext_index2  %14
  59. %define sin_index       %15
  60. %define constant1       %16
  61. %define constant2       %17
  62. %define PHASE           %18
  63. %define a2              d
  64. %define b2              a
  65. %define c2              b
  66. %define d2              c
  67. ;try switching the above PADDD with the SIN_INDEX PADDD, to spread out the memory accesses more.
  68.    MOVDQA  XMM4, C                                  ; load c
  69.     MOV   ESI, c                                 ; load c : u32
  70.     mov   edi,[EBP + alutext_index1 * 4 + PHASE] ; load x : u32
  71.    PADDD A, [EBP + mmxtext_index * 16]            ; A = A + x
  72.     XOR   ESI, d                                 ; c ^ d : u32
  73.     add   a, edi                                 ; a = a + x
  74.    PXOR  XMM4, D                                  ; c ^ d
  75.     AND   ESI,b                                  ; b & (c ^ d) : u32
  76.     ADD   a,  constant1                          ; add the constants, sin values, a = a + x + ac : u32
  77.    PAND  XMM4, B                                  ; b & (c ^ d)
  78.     XOR   ESI, d                                 ; d ^ (b & (c ^ d)) : u32
  79.     ADD   a,ESI                                  ; add to a, a = a + F(b, c, d) + x + ac : u32
  80.    PADDD A, [_sin_const + sin_index * 16]         ; add the constants, sin values, x + ac
  81.     ROL   a, alurot1                             ; rotate left : u32
  82.     MOV   ESI, c2                                ; load c : u32
  83.    PXOR  XMM4, D                                  ; d ^ (b & (c ^ d))
  84.     ADD   a, b                                   ; add b : u32
  85.     mov   edi,[EBP + alutext_index2 * 4 + PHASE] ; load x : u32
  86.    PADDD A,XMM4                                   ; add to a, a = a + F(b,c,d) + x + ac
  87.     XOR   ESI, d2                                ; c & d : u32
  88.     add   a2, edi                                ; a = a + x : u32
  89.    ; ROT not native to XMMX
  90. %if USE_PSHUFD_ROL
  91.    PSHUFD XMM6, A, 11100100b
  92. %else
  93.    MOVDQA  XMM6, A                                  ; store a
  94. %endif ; %if USE_PSHUFD_ROL
  95.     AND   ESI,b2                                 ; b & (c ^ d) : u32
  96.     ADD   a2,  constant2                         ; add the constants, sin values, x + ac : u32
  97.    PSLLD A, mmxrot                               ; shift a left
  98.     XOR   ESI, d2                                ; d ^ (b & (c ^ d)) : u32
  99.     ADD   a2,ESI                                 ; add to a, a = a + F(b, c, d) + x + ac : u32
  100.    PSRLD XMM6,32-mmxrot                           ; shift XMM4 right
  101.     ROL   a2, alurot2                            ; rotate left : u32
  102.     ADD   a2, b2                                 ; add b : u32
  103.    POR   A,XMM6                                   ; OR together
  104.    PADDD A, B                                    ; add b
  105. %endmacro
  106. ; the macros we will use assume the triple-blocks are in
  107. ; XMM0-XMM3 and EAX,EBX,ECX,EDX and the input block is accessed via EBP [e.g. 16 64-bit words and 16 32bit words]
  108. ; called as A,B,C,D,a,b,c,d,rot,text_index1,text_index2,sin_index,constant1,constant2,PHASE
  109. ;#define F(b, c, d) ((b & c) | (~b & d))
  110. ;#define F(b, c, d) (d ^ (b & (c ^ d)))
  111. ;  (a) += F ((b), (c), (d)) + (x) + (uns32)(ac); \
  112. ;  (a) = ROLuns32((a), (s)); \
  113. ;  (a) += (b);
  114. ;;   FF  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX,S11, 0, 0,0d76aa478h
  115. ;;   FF  XMM3,XMM0,XMM1,XMM2, EDX,EAX,EBX,ECX,S12, 1, 1,0e8c7b756h
  116. ;    Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  117. %macro Fg 18
  118. %define A               %1
  119. %define B               %2
  120. %define C               %3
  121. %define D               %4
  122. %define a               %5
  123. %define b               %6
  124. %define c               %7
  125. %define d               %8
  126. %define mmxrot          %9
  127. %define alurot1         %10
  128. %define alurot2         %11
  129. %define mmxtext_index   %12
  130. %define alutext_index1  %13
  131. %define alutext_index2  %14
  132. %define sin_index       %15
  133. %define constant1       %16
  134. %define constant2       %17
  135. %define PHASE           %18
  136. %define a2              d
  137. %define b2              a
  138. %define c2              b
  139. %define d2              c
  140.    MOVDQA  XMM4, C                                   ; load c
  141.     mov   esi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  142.     MOV   EDI, d                                  ; load d : u32
  143.    PADDD A, [EBP + mmxtext_index * 16]             ; A = A + X
  144.     add a, esi                                    ; a = a + x
  145.     NOT   EDI                                     ; ~d
  146.    PXOR  XMM4, D                                   ; c ^ d
  147.     MOV   ESI, d                                  ; load d : u32
  148.     AND  EDI, c                                   ; ~d & c : u32
  149.    PAND  XMM4, B                                   ; b & (c ^ d)
  150.     AND   ESI, b                                  ; b & d : u32
  151.     ADD   a,  constant1                           ; add the constants, sin values, x + ac : u32
  152.    PADDD A, [_sin_const + sin_index * 16]          ; add the constants, sin values, x + ac
  153.     OR    ESI, EDI                                ; G(b,c,d) = (b & d) | (~d & c)
  154.     ADD  a, ESI                                   ; add together, G(b,c,d) + x + ac : u32
  155.    PXOR  XMM4, D                                   ; d ^ (b & (c ^ d))
  156.     ROL  a, alurot1                               ; rotate left : u32
  157.     ADD a, b                                      ; add b : u32
  158.    PADDD A,XMM4                                    ; add to a, a = a + F(b,c,d) + x + ac
  159.     mov   esi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  160.     MOV   EDI, d2                                 ; load d : u32
  161.    ; ROT not native to XMMX
  162. %if USE_PSHUFD_ROL
  163.    PSHUFD XMM6, A, 11100100b
  164. %else
  165.    MOVDQA  XMM6, A                                   ; store a
  166. %endif ; %if USE_PSHUFD_ROL
  167.     add a2, esi
  168.     NOT   EDI                                     ; ~d
  169.    PSLLD A, mmxrot                                ; shift a left
  170.     MOV   ESI, d2                                 ; load d : u32
  171.     AND  EDI, c2                                  ; ~d & c : u32
  172.    PSRLD XMM6,32-mmxrot                            ; shift XMM4 right
  173.     AND   ESI, b2                                 ; b & d : u32
  174.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  175.    POR   A,XMM6                                    ; OR together
  176.     OR    ESI, EDI                                ; G(b,c,d) = (b & d) | (~d & c)
  177.     ADD  a2, ESI                                  ; add together, G(b,c,d) + x + ac : u32
  178.    PADDD A, B                                     ; add b
  179.     ROL  a2, alurot2                              ; rotate left : u32
  180.     ADD a2, b2                                    ; add b : u32
  181. %endmacro
  182. ;#define G(b, c, d) ((b & d) | (c & ~d))
  183. ;#define G(b, c, d) (c ^ (d & (b ^ c)))
  184. ;  (a) += G ((b), (c), (d)) + (x) + (uns32)(ac); \
  185. ;  (a) = ROLuns32((a), (s)); \
  186. ;  (a) += (b);
  187. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  188. %macro Gh 18
  189. %define A               %1
  190. %define B               %2
  191. %define C               %3
  192. %define D               %4
  193. %define a               %5
  194. %define b               %6
  195. %define c               %7
  196. %define d               %8
  197. %define mmxrot          %9
  198. %define alurot1         %10
  199. %define alurot2         %11
  200. %define mmxtext_index   %12
  201. %define alutext_index1  %13
  202. %define alutext_index2  %14
  203. %define sin_index       %15
  204. %define constant1       %16
  205. %define constant2       %17
  206. %define PHASE           %18
  207. %define a2              d
  208. %define b2              a
  209. %define c2              b
  210. %define d2              c
  211.    MOVDQA  XMM4, D                                 ; load d
  212.     mov edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  213.    MOVDQA  XMM5, D                                 ; load d
  214.     MOV   ESI, d                                ; load d : u32
  215.     ADD   a, edi                                ; a = a + x
  216.    PADDD A, [EBP + mmxtext_index * 16]           ; A = A + X
  217.     XOR   ESI, c                                ; d ^ c : u32
  218.     ADD   a,  constant1                         ; add the constants, sin values, x + ac : u32
  219.    PXOR  XMM5, [_all_one]                        ; ~d
  220.     XOR   ESI, b                                ; H(b,c,d) = (b ^ c ^ d) : u32
  221.     ADD a, ESI                                  ; add to a, a = a + H(b,c,d) + x + ac : u32
  222.    PAND  XMM4, B                                 ; b & d
  223.     ROL  a, alurot1                             ; rotate left : u32
  224.    PAND  XMM5, C                                 ; ~d & c
  225.     ADD a, b                                    ; add b : u32
  226.    PADDD A, [_sin_const + sin_index * 16]        ; add the constants, sin values, x + ac
  227.     mov edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  228.    POR   XMM4, XMM5                               ; (b & d) | (~d & c)
  229.     MOV   ESI, d2                               ; load d : u32
  230.     ADD   a2, edi                               ; load the text, x : u32
  231.    PADDD A, XMM4                                 ; add together, G(b,c,d) + x + ac
  232.     XOR   ESI, c2                               ; d ^ c : u32
  233.     ADD   a2,  constant2                        ; add the constants, sin values, x + ac : u32
  234.    ; ROT not native to XMMX
  235. %if USE_PSHUFD_ROL
  236.    PSHUFD XMM6, A, 11100100b
  237. %else
  238.    MOVDQA  XMM6, A                                 ; store a
  239. %endif ; %if USE_PSHUFD_ROL
  240.     XOR   ESI, b2                               ; H(b,c,d) = (b ^ c ^ d) : u32
  241.     ADD a2, ESI                                 ; add to a, a = a + H(b,c,d) + x + ac : u32
  242.    PSLLD A, mmxrot                              ; shift a left
  243.     ROL  a2, alurot2                            ; rotate left : u32
  244.    PSRLD XMM6, 32-mmxrot                         ; shift XMM4 right
  245.     ADD a2, b2                                  ; add b : u32
  246.    POR   A, XMM6                                 ; OR together
  247.    PADDD A, B                                   ; add b
  248. %endmacro
  249. ;#define G(b, c, d) ((b & d) | (c & ~d))
  250. ;#define G(b, c, d) (c ^ (d & (b ^ c)))
  251. ;  (a) += G ((b), (c), (d)) + (x) + (uns32)(ac); \
  252. ;  (a) = ROLuns32((a), (s)); \
  253. ;  (a) += (b);
  254. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  255. %macro Gi 18
  256. %define A               %1
  257. %define B               %2
  258. %define C               %3
  259. %define D               %4
  260. %define a               %5
  261. %define b               %6
  262. %define c               %7
  263. %define d               %8
  264. %define mmxrot          %9
  265. %define alurot1         %10
  266. %define alurot2         %11
  267. %define mmxtext_index   %12
  268. %define alutext_index1  %13
  269. %define alutext_index2  %14
  270. %define sin_index       %15
  271. %define constant1       %16
  272. %define constant2       %17
  273. %define PHASE           %18
  274. %define a2              d
  275. %define b2              a
  276. %define c2              b
  277. %define d2              c
  278. ;#define I(x, y, z) ((y) ^ ((x) | (~z)))
  279. ;#define II(a, b, c, d, x, s, ac)
  280. ;%if 0
  281.    MOVDQA  XMM4, D                                   ; load d
  282.     MOV   ESI, d                                  ; load d : u32
  283.     mov   edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  284.    MOVDQA  XMM5, D                                   ; load d
  285.     NOT   ESI                                     ; ~d : u32
  286.     ADD   a, edi                                  ; a = a + x
  287.    PADDD A, [_sin_const + sin_index * 16]          ; A = A + AC
  288.     OR    ESI, b                                  ; b | ~d : u32
  289.     ADD   a,  constant1                           ; a = a + x + ac
  290.    PXOR  XMM5, [_all_one]                          ; ~d
  291.     XOR  ESI,c                                    ; I(b,c,d) = c ^ (b | ~d) : u32
  292.     ADD a, ESI                                    ; add to a, a = a + I(b,c,d) + x + ac : u32
  293.    PAND  XMM4, B                                   ; b & d
  294.     ROL  a, alurot1                               ; rotate left : u32
  295.    PAND  XMM5, C                                   ; ~d & c
  296.     MOV   ESI, d2                                 ; load d : u32
  297.     ADD a, b                                      ; add b : u32
  298.    PADDD A, [EBP + mmxtext_index * 16]             ; A = A + AC + X
  299.     mov   edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  300.     NOT   ESI                                     ; ~d : u32
  301.    POR   XMM4, XMM5                                 ; (b & d) | (~d & c)
  302.     ADD   a2, edi                                 ; a = a + x
  303.     OR    ESI, b2                                 ; b | ~d : u32
  304.    PADDD A, XMM4                                   ; add together, G(b,c,d) + x + ac
  305.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  306.     XOR  ESI,c2                                   ; I(b,c,d) = c ^ (b | ~d) : u32
  307.  
  308.    ; ROT not native to XMMX
  309. %if USE_PSHUFD_ROL
  310.    PSHUFD XMM6, A, 11100100b
  311. %else
  312.    MOVDQA  XMM6, A                                   ; store a
  313. %endif ; %if USE_PSHUFD_ROL
  314.     ADD a2,ESI                                    ; add to a, a = a + I(b,c,d) + x + ac : u32
  315.    PSLLD A, mmxrot                                ; shift a left
  316.     ROL  a2, alurot2                              ; rotate left : u32
  317.    PSRLD XMM6, 32-mmxrot                           ; shift XMM4 right
  318.     ADD a2, b2                                    ; add b : u32
  319.    POR   A, XMM6                                   ; OR together
  320.    PADDD A, B                                     ; add b
  321. %endmacro
  322. ;#define H(x, y, z) ((x) ^ (y) ^ (z))
  323. ;#define HH(a, b, c, d, x, s, ac) \
  324. ;  (a) += H ((b), (c), (d)) + (x) + (uns32)(ac); \
  325. ;  (a) = ROLuns32((a), (s)); \
  326. ;  (a) += (b);
  327. ;  Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  328. %macro Hf 18
  329. %define A               %1
  330. %define B               %2
  331. %define C               %3
  332. %define D               %4
  333. %define a               %5
  334. %define b               %6
  335. %define c               %7
  336. %define d               %8
  337. %define mmxrot          %9
  338. %define alurot1         %10
  339. %define alurot2         %11
  340. %define mmxtext_index   %12
  341. %define alutext_index1  %13
  342. %define alutext_index2  %14
  343. %define sin_index       %15
  344. %define constant1       %16
  345. %define constant2       %17
  346. %define PHASE           %18
  347. %define a2              d
  348. %define b2              a
  349. %define c2              b
  350. %define d2              c
  351.    MOVDQA  XMM4, D                                  ; load d
  352.     MOV   ESI, c                                 ; load c : u32
  353.     mov   edi,[EBP + alutext_index1 * 4 + PHASE] ; load x
  354.    PADDD A, [EBP + mmxtext_index * 16]            ; A = A + X
  355.     XOR   ESI, d                                 ; c ^ d : u32
  356.     add a, edi                                   ; a = a + x
  357.    PXOR  XMM4, C                                  ; d ^ c
  358.     AND   ESI,b                                  ; b & (c ^ d) : u32
  359.     ADD   a,  constant1                          ; add the constants, sin values, x + ac : u32
  360.    PADDD A, [_sin_const + sin_index * 16]         ; add the constants, sin values, x + ac
  361.     XOR   ESI, d                                 ; d ^ (b & (c ^ d)) : u32
  362.     ADD   a, ESI                                 ; add to a, a = a + F(b, c, d) + x + ac : u32
  363.    PXOR  XMM4, B                                  ; H(b,c,d) = (b ^ c ^ d)
  364.     MOV   ESI, c2                                ; load c : u32
  365.     ROL   a, alurot1                             ; rotate left : u32
  366.    PADDD A, XMM4                                  ; add to a, a = a + H(b,c,d) + x + ac
  367.     mov   edi,[EBP + alutext_index2 * 4 + PHASE] ; load x
  368.     ADD   a, b                                   ; add b : u32
  369.    ; ROT not native to XMMX
  370. %if USE_PSHUFD_ROL
  371.    PSHUFD XMM6, A, 11100100b
  372. %else
  373.    MOVDQA  XMM6, A                                  ; store a
  374. %endif ; %if USE_PSHUFD_ROL
  375.     XOR   ESI, d2                                ; c & d : u32
  376.     add a2, edi                                  ; a = a + x : u32
  377.    PSLLD A, mmxrot                               ; shift a left
  378.     AND   ESI,b2                                 ; b & (c ^ d) : u32
  379.     ADD   a2,  constant2                         ; a = a + x + ac : u32
  380.    PSRLD XMM6,32-mmxrot                           ; shift XMM4 right
  381.     XOR   ESI, d2                                ; d ^ (b & (c ^ d)) : u32
  382.     ADD   a2, ESI                                ; add to a, a = a + F(b, c, d) + x + ac : u32
  383.    POR   A,XMM6                                   ; OR together
  384.     ROL   a2, alurot2                            ; rotate left : u32
  385.    PADDD A, B                                    ; a = a + b
  386.     ADD   a2, b2                                 ; add b : u32
  387. %endmacro
  388. ;#define H(x, y, z) ((x) ^ (y) ^ (z))
  389. ;#define HH(a, b, c, d, x, s, ac) \
  390. ;  (a) += H ((b), (c), (d)) + (x) + (uns32)(ac); \
  391. ;  (a) = ROLuns32((a), (s)); \
  392. ;  (a) += (b);
  393. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  394. %macro Hg 18
  395. %define A               %1
  396. %define B               %2
  397. %define C               %3
  398. %define D               %4
  399. %define a               %5
  400. %define b               %6
  401. %define c               %7
  402. %define d               %8
  403. %define mmxrot          %9
  404. %define alurot1         %10
  405. %define alurot2         %11
  406. %define mmxtext_index   %12
  407. %define alutext_index1  %13
  408. %define alutext_index2  %14
  409. %define sin_index       %15
  410. %define constant1       %16
  411. %define constant2       %17
  412. %define PHASE           %18
  413. %define a2              d
  414. %define b2              a
  415. %define c2              b
  416. %define d2              c
  417.    MOVDQA  XMM4, D                                   ; load d
  418.     mov   esi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  419.     MOV   EDI, c                                  ; load c : u32
  420.    PADDD A, [EBP + mmxtext_index * 16]             ; load the text, x
  421.     add   a, esi                                  ; a = a + x
  422.     XOR   EDI, b                                  ; b ^ c
  423.    PXOR   XMM4, C                                  ; d ^ c
  424.     ADD   a, constant1                            ; add the constants, sin values, x + ac : u32
  425.     AND   EDI, d                                  ; d & (b ^ c)
  426.    PADDD A, [_sin_const + sin_index * 16]          ; add the constants, sin values, x + ac
  427.     XOR  EDI, c                                   ; G(b,c,d) = c ^ (d & (b ^ c))
  428.     mov   esi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  429.    PXOR  XMM4, B                                   ; H(b,c,d) = (b ^ c ^ d)
  430.     ADD  a, EDI                                   ; add together, G(b,c,d) + x + ac : u32
  431.     ROL a, alurot1                                ; a = a ROL ?
  432.    PADDD A, XMM4                                   ; add to a, a = a + H(b,c,d) + x + ac
  433.     MOV   EDI, c2                                 ; load c : u32
  434.     ADD  a, b                                     ; a = a + b
  435.    ; ROT not native to XMMX
  436. %if USE_PSHUFD_ROL
  437.    PSHUFD XMM6, A, 11100100b
  438. %else
  439.    MOVDQA  XMM6, A                                   ; store a
  440. %endif ; %if USE_PSHUFD_ROL
  441.     XOR EDI, b2                                   ; c ^ b
  442.     add a2, esi                                   ; a = a + x
  443.    PSLLD A, mmxrot                                ; shift a left
  444.     AND  EDI, d2                                  ; d & (c ^ b)
  445.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  446.    PSRLD XMM6,32-mmxrot                            ; shift XMM6 right
  447.     XOR  EDI, c2                                 ; G(b,c,d) = c ^ (d & (b ^ c)) = (b & d) | (~d & c)
  448.     ADD  a2, EDI                                  ; add together, G(b,c,d) + x + ac : u32
  449.    POR   A,XMM6                                    ; OR together
  450.     ROL  a2, alurot2                              ; rotate left : u32
  451.     ADD a2, b2                                    ; add b : u32
  452.    PADDD A, B                                     ; add b
  453. %endmacro
  454. ;#define I(x, y, z) ((y) ^ ((x) | (~z)))
  455. ;#define II(a, b, c, d, x, s, ac) \
  456. ;  (a) += I ((b), (c), (d)) + (x) + (uns32)(ac); \
  457. ;  (a) = ROLuns32((a), (s)); \
  458. ;  (a) += (b);
  459. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  460. %macro Ih 18
  461. %define A               %1
  462. %define B               %2
  463. %define C               %3
  464. %define D               %4
  465. %define a               %5
  466. %define b               %6
  467. %define c               %7
  468. %define d               %8
  469. %define mmxrot          %9
  470. %define alurot1         %10
  471. %define alurot2         %11
  472. %define mmxtext_index   %12
  473. %define alutext_index1  %13
  474. %define alutext_index2  %14
  475. %define sin_index       %15
  476. %define constant1       %16
  477. %define constant2       %17
  478. %define PHASE           %18
  479. %define a2              d
  480. %define b2              a
  481. %define c2              b
  482. %define d2              c
  483.    MOVDQA  XMM4, D                                 ; load d
  484.     mov edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  485.     MOV   ESI, d                                ; load d : u32
  486.    PXOR  XMM4,[_all_one]                         ; ~d
  487.     ADD   a, edi                                ; load the text, x : u32
  488.     XOR   ESI, c                                ; d ^ c : u32
  489.    PADDD A, [EBP + mmxtext_index * 16]           ; load the text, x
  490.     ADD   a,  constant1                         ; add the constants, sin values, x + ac : u32
  491.     XOR   ESI, b                                ; H(b,c,d) = (b ^ c ^ d) : u32
  492.    POR   XMM4, B                                 ; b | ~d
  493.     ADD a, ESI                                  ; add to a, a = a + H(b,c,d) + x + ac : u32
  494.     ROL  a, alurot1                             ; rotate left : u32
  495.    PADDD A, [_sin_const + sin_index * 16]        ; add the constants, sin values, x + ac
  496.     ADD a, b                                    ; add b : u32
  497.     mov edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  498.    PXOR XMM4,C                                   ; c ^ (b | ~d)
  499.     MOV   ESI, d2                               ; load d : u32
  500.     ADD   a2, edi                               ; load the text, x : u32
  501.    PADDD A,XMM4                                  ; add to a, a = a + I(b,c,d) + x + ac
  502.     XOR   ESI, c2                               ; d ^ c : u32
  503.     ADD   a2,  constant2                        ; add the constants, sin values, x + ac : u32
  504.    ; ROT not native to XMMX
  505. %if USE_PSHUFD_ROL
  506.    PSHUFD XMM6, A, 11100100b
  507. %else
  508.    MOVDQA  XMM6, A                                 ; store a
  509. %endif ; %if USE_PSHUFD_ROL
  510.     XOR   ESI, b2                               ; H(b,c,d) = (b ^ c ^ d) : u32
  511.    PSLLD A, mmxrot                              ; shift a left
  512.     ADD a2, ESI                                 ; add to a, a = a + H(b,c,d) + x + ac : u32
  513.    PSRLD XMM6,32-mmxrot                          ; shift XMM4 right
  514.     ROL  a2, alurot2                            ; rotate left : u32
  515.    POR   A,XMM6                                  ; OR together
  516.     ADD a2, b2                                  ; a = a + b
  517.    PADDD A, B                                   ; a = a + b
  518. %endmacro
  519. ;#define I(x, y, z) (y ^ (x | ~z))
  520. ;#define II(a, b, c, d, x, s, ac) \
  521. ;  (a) += I ((b), (c), (d)) + (x) + (uns32)(ac); \
  522. ;  (a) = ROLuns32((a), (s)); \
  523. ;  (a) += (b);
  524. ;  Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  525. %macro Ii 18
  526. %define A               %1
  527. %define B               %2
  528. %define C               %3
  529. %define D               %4
  530. %define a               %5
  531. %define b               %6
  532. %define c               %7
  533. %define d               %8
  534. %define mmxrot          %9
  535. %define alurot1         %10
  536. %define alurot2         %11
  537. %define mmxtext_index   %12
  538. %define alutext_index1  %13
  539. %define alutext_index2  %14
  540. %define sin_index       %15
  541. %define constant1       %16
  542. %define constant2       %17
  543. %define PHASE           %18
  544. %define a2              d
  545. %define b2              a
  546. %define c2              b
  547. %define d2              c
  548.    MOVDQA  XMM4, D                                   ; load d
  549.     MOV   ESI, d                                  ; load d : u32
  550.     mov   edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  551.    PXOR  XMM4,[_all_one]                           ; ~d
  552.     NOT   ESI                                     ; ~d : u32
  553.     ADD   a, edi                                  ; a = a + x
  554.    PADDD A, [EBP + mmxtext_index * 16]             ; a = a + x
  555.     OR    ESI, b                                  ; b | ~d : u32
  556.     ADD   a,  constant1                           ; add the constants, sin values, x + ac : u32
  557.    POR   XMM4, B                                   ; b | ~d
  558.     XOR  ESI, c                                   ; I(b,c,d) = c ^ (b | ~d) : u32
  559.     ADD a, ESI                                    ; add to a, a = a + I(b,c,d) + x + ac : u32
  560.    PADDD A, [_sin_const + sin_index * 16]          ; add the constants, sin values, x + ac
  561.     MOV   ESI, d2                                 ; load d : u32
  562.     ROL  a, alurot1                               ; rotate left : u32
  563.    PXOR XMM4, C                                    ; I(b,c,d) = c ^ (b | ~d)
  564.     mov   edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  565.     ADD a, b                                      ; add b : u32
  566.    PADDD A,XMM4                                    ; add to a, a = a + I(b,c,d) + x + ac
  567.     NOT   ESI                                     ; ~d : u32
  568.     ADD   a2, edi                                 ; a + x
  569.    ; ROT not native to XMMX
  570. %if USE_PSHUFD_ROL
  571.    PSHUFD XMM6, A, 11100100b
  572. %else
  573.    MOVDQA  XMM6, A                                   ; store a
  574. %endif ; %if USE_PSHUFD_ROL
  575.     OR    ESI, b2                                 ; b | ~d : u32
  576.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  577.    PSLLD A, mmxrot                                ; shift a left
  578.     XOR  ESI, c2                                  ; I(b,c,d) = c ^ (b | ~d) : u32
  579.    PSRLD XMM6,32-mmxrot                            ; shift XMM4 right
  580.     ADD a2, ESI                                   ; add to a, a = a + I(b,c,d) + x + ac : u32
  581.    POR   A,XMM6                                    ; OR together
  582.     ROL  a2, alurot2                              ; rotate left : u32
  583.    PADDD A, B                                     ; add b
  584.     ADD a2, b2                                    ; add b : u32
  585. %endmacro
  586. [bits 32]
  587. [section .text align=64]
  588.    
  589. [global _md5_x86_u32sse2_2_transform]
  590. ; void _md5_x86_u32sse2_2_transform(uns32 *md, const uns32 *msg)
  591. _md5_x86_u32sse2_2_transform:
  592.    PUSHAD
  593.    MOV EBP,[ESP+36]            ; source message
  594.    ; load inital block into XMM0-XMM3
  595.    MOVDQA XMM0,[_initial_state+ 0]
  596.    MOVDQA XMM1,[_initial_state+16]
  597.    MOVDQA XMM2,[_initial_state+32]
  598.    MOVDQA XMM3,[_initial_state+48]
  599.    ; load inital block into EAX,EBX,ECX,EDX
  600.    ;the Input Block is at EBP+PHASE1
  601.    MOV EAX,067452301h
  602.    MOV EBX,0efcdab89h
  603.    MOV ECX,098badcfeh
  604.    MOV EDX,010325476h
  605.    ; do FF rounds
  606.    Ff XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S11,S12, 00,00,01, 00, 0d76aa478h,0e8c7b756h, PHASE1
  607.    Ff XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S13,S14, 01,02,03, 01, 0242070dbh,0c1bdceeeh, PHASE1
  608.    Ff XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S11,S12, 02,04,05, 02, 0f57c0fafh,04787c62ah, PHASE1
  609.    Ff XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S13,S14, 03,06,07, 03, 0a8304613h,0fd469501h, PHASE1
  610.    Ff XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S11,S12, 04,08,09, 04, 0698098d8h,08b44f7afh, PHASE1
  611.    Ff XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S13,S14, 05,10,11, 05, 0ffff5bb1h,0895cd7beh, PHASE1
  612.    Ff XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S11,S12, 06,12,13, 06, 06b901122h,0fd987193h, PHASE1
  613.    Ff XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S13,S14, 07,14,15, 07, 0a679438eh,049b40821h, PHASE1
  614.    Fg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S21,S22, 08,01,06, 08, 0f61e2562h,0c040b340h, PHASE1
  615.    Fg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S23,S24, 09,11,00, 09, 0265e5a51h,0e9b6c7aah, PHASE1
  616.    Fg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S21,S22, 10,05,10, 10, 0d62f105dh,002441453h, PHASE1
  617.    Fg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S23,S24, 11,15,04, 11, 0d8a1e681h,0e7d3fbc8h, PHASE1
  618.    Fg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S21,S22, 12,09,14, 12, 021e1cde6h,0c33707d6h, PHASE1
  619.    Fg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S23,S24, 13,03,08, 13, 0f4d50d87h,0455a14edh, PHASE1
  620.    Fg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S21,S22, 14,13,02, 14, 0a9e3e905h,0fcefa3f8h, PHASE1
  621.    Fg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S23,S24, 15,07,12, 15, 0676f02d9h,08d2a4c8ah, PHASE1
  622.    ; do GG rounds
  623.    Gh XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S31,S32, 01,05,08, 16, 0fffa3942h,08771f681h, PHASE1
  624.    Gh XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S33,S34, 06,11,14, 17, 06d9d6122h,0fde5380ch, PHASE1
  625.    Gh XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S31,S32, 11,01,04, 18, 0a4beea44h,04bdecfa9h, PHASE1
  626.    Gh XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S33,S34, 00,07,10, 19, 0f6bb4b60h,0bebfbc70h, PHASE1
  627.    Gh XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S31,S32, 05,13,00, 20, 0289b7ec6h,0eaa127fah, PHASE1
  628.    Gh XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S33,S34, 10,03,06, 21, 0d4ef3085h,004881d05h, PHASE1
  629.    Gh XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S31,S32, 15,09,12, 22, 0d9d4d039h,0e6db99e5h, PHASE1
  630.    Gh XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S33,S34, 04,15,02, 23, 01fa27cf8h,0c4ac5665h, PHASE1
  631.    Gi XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S41,S42, 09,00,07, 24, 0f4292244h,0432aff97h, PHASE1
  632.    Gi XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S43,S44, 14,14,05, 25, 0ab9423a7h,0fc93a039h, PHASE1
  633.    Gi XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S41,S42, 03,12,03, 26, 0655b59c3h,08f0ccc92h, PHASE1
  634.    Gi XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S43,S44, 08,10,01, 27, 0ffeff47dh,085845dd1h, PHASE1
  635.    Gi XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S41,S42, 13,08,15, 28, 06fa87e4fh,0fe2ce6e0h, PHASE1
  636.    Gi XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S43,S44, 02,06,13, 29, 0a3014314h,04e0811a1h, PHASE1
  637.    Gi XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S41,S42, 07,04,11, 30, 0f7537e82h,0bd3af235h, PHASE1
  638.    Gi XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S43,S44, 12,02,09, 31, 02ad7d2bbh,0eb86d391h, PHASE1
  639.    ; final addition
  640.     ADD   EAX,067452301h          ;
  641.     ADD   EBX,0efcdab89h          ;
  642.     ADD   ECX,098badcfeh          ;
  643.     ADD   EDX,010325476h          ;
  644.     MOV  [EBP+PHASE1+ 0],EAX            ; 4bytes u32
  645.     MOV  [EBP+PHASE1+ 4],EBX            ; 4bytes u32
  646.     MOV  [EBP+PHASE1+ 8],ECX            ; 4bytes u32
  647.     MOV  [EBP+PHASE1+12],EDX            ; 4bytes u32
  648.    ; load inital block into EAX,EBX,ECX,EDX
  649.    ;the Input Block is at EBP+PHASE2
  650.    MOV EAX,067452301h
  651.    MOV EBX,0efcdab89h
  652.    MOV ECX,098badcfeh
  653.    MOV EDX,010325476h
  654. ; do HH rounds
  655.    Hf XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S11,S12, 05,00,01, 32, 0d76aa478h,0e8c7b756h, PHASE2
  656.    Hf XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S13,S14, 08,02,03, 33, 0242070dbh,0c1bdceeeh, PHASE2
  657.    Hf XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S11,S12, 11,04,05, 34, 0f57c0fafh,04787c62ah, PHASE2
  658.    Hf XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S13,S14, 14,06,07, 35, 0a8304613h,0fd469501h, PHASE2
  659.    Hf XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S11,S12, 01,08,09, 36, 0698098d8h,08b44f7afh, PHASE2
  660.    Hf XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S13,S14, 04,10,11, 37, 0ffff5bb1h,0895cd7beh, PHASE2
  661.    Hf XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S11,S12, 07,12,13, 38, 06b901122h,0fd987193h, PHASE2
  662.    Hf XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S13,S14, 10,14,15, 39, 0a679438eh,049b40821h, PHASE2
  663.    Hg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S21,S22, 13,01,06, 40, 0f61e2562h,0c040b340h, PHASE2
  664.    Hg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S23,S24, 00,11,00, 41, 0265e5a51h,0e9b6c7aah, PHASE2
  665.    Hg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S21,S22, 03,05,10, 42, 0d62f105dh,002441453h, PHASE2
  666.    Hg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S23,S24, 06,15,04, 43, 0d8a1e681h,0e7d3fbc8h, PHASE2
  667.    Hg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S21,S22, 09,09,14, 44, 021e1cde6h,0c33707d6h, PHASE2
  668.    Hg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S23,S24, 12,03,08, 45, 0f4d50d87h,0455a14edh, PHASE2
  669.    Hg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S21,S22, 15,13,02, 46, 0a9e3e905h,0fcefa3f8h, PHASE2
  670.    Hg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S23,S24, 02,07,12, 47, 0676f02d9h,08d2a4c8ah, PHASE2
  671.    ; do II rounds
  672.    Ih XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S31,S32, 00,05,08, 48, 0fffa3942h,08771f681h, PHASE2
  673.    Ih XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S33,S34, 07,11,14, 49, 06d9d6122h,0fde5380ch, PHASE2
  674.    Ih XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S31,S32, 14,01,04, 50, 0a4beea44h,04bdecfa9h, PHASE2
  675.    Ih XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S33,S34, 05,07,10, 51, 0f6bb4b60h,0bebfbc70h, PHASE2
  676.    Ih XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S31,S32, 12,13,00, 52, 0289b7ec6h,0eaa127fah, PHASE2
  677.    Ih XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S33,S34, 03,03,06, 53, 0d4ef3085h,004881d05h, PHASE2
  678.    Ih XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S31,S32, 10,09,12, 54, 0d9d4d039h,0e6db99e5h, PHASE2
  679.    Ih XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S33,S34, 01,15,02, 55, 01fa27cf8h,0c4ac5665h, PHASE2
  680.    Ii XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S41,S42, 08,00,07, 56, 0f4292244h,0432aff97h, PHASE2
  681.    Ii XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S43,S44, 15,14,05, 57, 0ab9423a7h,0fc93a039h, PHASE2
  682.    Ii XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S41,S42, 06,12,03, 58, 0655b59c3h,08f0ccc92h, PHASE2
  683.    Ii XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S43,S44, 13,10,01, 59, 0ffeff47dh,085845dd1h, PHASE2
  684.    Ii XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S41,S42, 04,08,15, 60, 06fa87e4fh,0fe2ce6e0h, PHASE2
  685.    Ii XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S43,S44, 11,06,13, 61, 0a3014314h,04e0811a1h, PHASE2
  686.    Ii XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S41,S42, 02,04,11, 62, 0f7537e82h,0bd3af235h, PHASE2
  687.    Ii XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S43,S44, 09,02,09, 63, 02ad7d2bbh,0eb86d391h, PHASE2
  688.    ; final addition
  689.    PADDD XMM0,[_initial_state+ 0]
  690.     ADD   EAX,067452301h          ;
  691.    PADDD XMM1,[_initial_state+16]
  692.     ADD   EBX,0efcdab89h          ;
  693.    PADDD XMM2,[_initial_state+32]
  694.     ADD   ECX,098badcfeh          ;
  695.    PADDD XMM3,[_initial_state+48]
  696.     ADD   EDX,010325476h          ;
  697. ; mark add 4
  698. ;MOV EBP,[ESP+36]               ; the digest destination, same as input source...faster this way
  699.    MOVDQA  [EBP+ 0],XMM0             ; 8bytes mmx
  700.    MOVDQA  [EBP+16],XMM1             ; 8bytes mmx
  701.    MOVDQA  [EBP+32],XMM2             ; 8bytes mmx
  702.    MOVDQA  [EBP+48],XMM3             ; 8bytes mmx
  703.     MOV  [EBP+PHASE2+ 0],EAX            ; 4bytes u32
  704.     MOV  [EBP+PHASE2+ 4],EBX            ; 4bytes u32
  705.     MOV  [EBP+PHASE2+ 8],ECX            ; 4bytes u32
  706.     MOV  [EBP+PHASE2+12],EDX            ; 4bytes u32
  707.    ; close up shop and return
  708. ;EXMMS
  709.    POPAD; EDI, ESI, EBP, nothing (placeholder for ESP), EBX, EDX, ECX and EAX. It reverses the operation of PUSHAD
  710.    RET
  711. [bits 32]
  712. [section .data align=64]
  713. ;buffer to make sure that code and data never share the same cache line.
  714. empty:
  715.    times 128 db 0
  716. align 16
  717. tempi:
  718.    times 64 dd 0
  719. tempo:
  720.    times 16  dd 0
  721. _all_one:
  722. times 4 DD 0ffffffffh
  723. _initial_state:
  724. times 4 DD 067452301h
  725. times 4 DD 0efcdab89h
  726. times 4 DD 098badcfeh
  727. times 4 DD 010325476h
  728. _sin_const:
  729.    times 4 DD 0d76aa478h
  730.    times 4 DD 0e8c7b756h
  731.    times 4 DD 0242070dbh
  732.    times 4 DD 0c1bdceeeh
  733.    times 4 DD 0f57c0fafh
  734.    times 4 DD 04787c62ah
  735.    times 4 DD 0a8304613h
  736.    times 4 DD 0fd469501h
  737.    times 4 DD 0698098d8h
  738.    times 4 DD 08b44f7afh
  739.    times 4 DD 0ffff5bb1h
  740.    times 4 DD 0895cd7beh
  741.    times 4 DD 06b901122h
  742.    times 4 DD 0fd987193h
  743.    times 4 DD 0a679438eh
  744.    times 4 DD 049b40821h
  745.    times 4 DD 0f61e2562h
  746.    times 4 DD 0c040b340h
  747.    times 4 DD 0265e5a51h
  748.    times 4 DD 0e9b6c7aah
  749.    times 4 DD 0d62f105dh
  750.    times 4 DD 002441453h
  751.    times 4 DD 0d8a1e681h
  752.    times 4 DD 0e7d3fbc8h
  753.    times 4 DD 021e1cde6h
  754.    times 4 DD 0c33707d6h
  755.    times 4 DD 0f4d50d87h
  756.    times 4 DD 0455a14edh
  757.    times 4 DD 0a9e3e905h
  758.    times 4 DD 0fcefa3f8h
  759.    times 4 DD 0676f02d9h
  760.    times 4 DD 08d2a4c8ah
  761.    times 4 DD 0fffa3942h
  762.    times 4 DD 08771f681h
  763.    times 4 DD 06d9d6122h
  764.    times 4 DD 0fde5380ch
  765.    times 4 DD 0a4beea44h
  766.    times 4 DD 04bdecfa9h
  767.    times 4 DD 0f6bb4b60h
  768.    times 4 DD 0bebfbc70h
  769.    times 4 DD 0289b7ec6h
  770.    times 4 DD 0eaa127fah
  771.    times 4 DD 0d4ef3085h
  772.    times 4 DD 004881d05h
  773.    times 4 DD 0d9d4d039h
  774.    times 4 DD 0e6db99e5h
  775.    times 4 DD 01fa27cf8h
  776.    times 4 DD 0c4ac5665h
  777.    times 4 DD 0f4292244h
  778.    times 4 DD 0432aff97h
  779.    times 4 DD 0ab9423a7h
  780.    times 4 DD 0fc93a039h
  781.    times 4 DD 0655b59c3h
  782.    times 4 DD 08f0ccc92h
  783.    times 4 DD 0ffeff47dh
  784.    times 4 DD 085845dd1h
  785.    times 4 DD 06fa87e4fh
  786.    times 4 DD 0fe2ce6e0h
  787.    times 4 DD 0a3014314h
  788.    times 4 DD 04e0811a1h
  789.    times 4 DD 0f7537e82h
  790.    times 4 DD 0bd3af235h
  791.    times 4 DD 02ad7d2bbh
  792.    times 4 DD 0eb86d391h


[:petrus75]

n°844343
masklinn
í dag viðrar vel til loftárása
Posté le 07-09-2004 à 17:21:26  profilanswer
 

Ca fait mal au cul quand même, mon firefox rame plus sur un 733 avec 512 Mo de RAM que celui qui est sur un 500 avec 128Mo de RAM :/
 
bon faut dire j'ai 3 fois plus d'extensions sur celui la ^_^
 
Figure 22: Tout le monde n'a pas mal au cul


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°844344
antp
Super Administrateur
Champion des excuses bidons
Posté le 07-09-2004 à 17:21:32  profilanswer
 

Masklinn a écrit :

erf, toi aussi t'as une porte qui se ferme toute seule et une tendance à oublier les choses sans importance telles que l'endroit ou t'as mis tes clés?


 
C'est surtout que si j'ai pas de veste sur moi j'oublie de les prendre :/ (d'habitude elles restent dans la poche de ma veste, pour ne pas oublier justement)

n°844345
skeye
Posté le 07-09-2004 à 17:22:04  profilanswer
 

Harkonnen a écrit :

koo koo [:dawa]
j'ai recodé mon md5 [:petrus75]

Code :
  1. ...


[:petrus75]


 [:alph-one]


---------------
Can't buy what I want because it's free -
n°844349
skeye
Posté le 07-09-2004 à 17:25:01  profilanswer
 

Bon, une journée pour un fichier à la con à charger, ça peut aller...:o


---------------
Can't buy what I want because it's free -
n°844351
drasche
Posté le 07-09-2004 à 17:26:08  profilanswer
 

antp a écrit :

(préparez les "rofl" )
 
boulet du jour : antp
 
je sors de chez moi, je me dis "il fait trop chaud pour prendre une veste", je laisse la veste à l'intérieur, je claque la porte
[:totoz] mes clés étaient dans ma veste
 
heureusement que mes voisins étaient là
heureusement que la fenêtre du 3è étage était ouverte
heureusement que l'on peut marcher sur les goutières
heureusement que je n'ai pas trop le vertige :o


tu fais un concours avec Harko? [:opus dei]


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°844352
fabien
Vive la super 5 !
Posté le 07-09-2004 à 17:27:27  profilanswer
 

harko, tu fais tout cela juste pour un mot de passe en md5 ? :??:
 

n°844353
skeye
Posté le 07-09-2004 à 17:28:11  profilanswer
 

Fabien a écrit :

harko, tu fais tout cela juste pour un mot de passe en md5 ? :??:


c'est pas "juste pour un mot de passe en md5", c'est pour la beauté de l'asm x86...[:delarue2]


---------------
Can't buy what I want because it's free -
n°844355
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 07-09-2004 à 17:29:30  profilanswer
 

Fabien a écrit :

harko, tu fais tout cela juste pour un mot de passe en md5 ? :??:

c'est pas de moi hein ;)
mais sinon, s'il m'avait pris l'idée de le coder en assembleur, ça aurait eu cette tronche.
ça a l'air de te surprendre ? :??:

n°844357
lorill
Posté le 07-09-2004 à 17:34:54  profilanswer
 

Harkonnen a écrit :


j'ai recodé mon md5 [:petrus75]


 

Harkonnen a écrit :

c'est pas de moi hein ;)


:gratgrat:

n°844358
Harkonnen
Modérateur
Un modo pour les bannir tous
Posté le 07-09-2004 à 17:36:39  profilanswer
 

sté une blague, second degré, toussa :o
comme si en 24 heures de temps j'aurais eu le temps de me parser la RFC, de la capter du 1er coup, et de la recoder en assembleur, avec utilisation du SIMD, cache optimisation et tout [:kiki]

n°844361
lorill
Posté le 07-09-2004 à 17:37:48  profilanswer
 

Harkonnen a écrit :

sté une blague, second degré, toussa :o


[:petrus75]

n°844366
skeye
Posté le 07-09-2004 à 17:46:15  profilanswer
 


les fans d'assembleur ne sont pas des gens comme nous...:o


---------------
Can't buy what I want because it's free -
n°844382
simogeo
j'ai jamais tué de chats, ...
Posté le 07-09-2004 à 17:59:48  profilanswer
 

salut  [:canth]


---------------
from here and there -- \o__________________________________ -- la révolution de la terre, en silence
n°844388
Mr Mala
Posté le 07-09-2004 à 18:02:47  profilanswer
 

skeye a écrit :

les fans d'assembleur ne sont pas des gens comme nous...:o


 
les fans d'assembleur ne sont pas des gens .POINT  :o

n°844389
lorill
Posté le 07-09-2004 à 18:02:54  profilanswer
 

quelqu'un connait la boite 'vocamen' ?

n°844395
uriel
blood pt.2
Posté le 07-09-2004 à 18:05:00  profilanswer
 


 
http://img73.exs.cx/img73/518/petruseaf.gif
 
http://img73.exs.cx/img73/518/petruseaf.gif
edit: [:petrus75]


Message édité par uriel le 07-09-2004 à 18:06:16

---------------
IVG en france
n°844403
uriel
blood pt.2
Posté le 07-09-2004 à 18:08:11  profilanswer
 

tiens, tant que je suis la: gizmo ou tout autre personne qui utilise Postegre, est ce normal d'avoir beaucoup de processus Python qui tourne avec?


---------------
IVG en france
n°844408
drasche
Posté le 07-09-2004 à 18:11:09  profilanswer
 

Mr Mala a écrit :

les fans d'assembleur ne sont pas des gens .POINT  :o


moi j'aime l'assembleur :o


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°844410
simogeo
j'ai jamais tué de chats, ...
Posté le 07-09-2004 à 18:14:46  profilanswer
 

uriel a écrit :

*CENSURE*
 
http://img73.exs.cx/img73/518/petruseaf.gif
edit: [:petrus75]


 
haaaaannnnnnnnnnn  http://www.microserfs.net/HFR/petrus/lovetounet.gifhttp://www.microserfs.net/HFR/petrus/lovetounet.gifhttp://www.microserfs.net/HFR/petrus/lovetounet.gif
 
 
http://img73.exs.cx/img73/518/petruseaf.gif http://img73.exs.cx/img73/518/petruseaf.gif http://img73.exs.cx/img73/518/petruseaf.gif


---------------
from here and there -- \o__________________________________ -- la révolution de la terre, en silence
n°844412
skeye
Posté le 07-09-2004 à 18:15:20  profilanswer
 

drasche a écrit :

moi j'aime l'assembleur :o


...et tu espères que ça infirme la règle?:o


---------------
Can't buy what I want because it's free -
n°844413
Mr Mala
Posté le 07-09-2004 à 18:15:22  profilanswer
 

drasche a écrit :

moi j'aime l'assembleur :o


 
aimer != fan ! ... moi aussi, j'aime bien ... mais de là à avoir envie de pondre un codage md5 .................. :D

n°844415
simogeo
j'ai jamais tué de chats, ...
Posté le 07-09-2004 à 18:17:45  profilanswer
 

:o


Message édité par simogeo le 07-09-2004 à 18:18:47

---------------
from here and there -- \o__________________________________ -- la révolution de la terre, en silence
n°844417
uriel
blood pt.2
Posté le 07-09-2004 à 18:20:49  profilanswer
 


 
bon j'attaque la version anime [:iorili]


---------------
IVG en france
n°844421
simogeo
j'ai jamais tué de chats, ...
Posté le 07-09-2004 à 18:24:05  profilanswer
 

uriel a écrit :

bon j'attaque la version anime [:iorili]


 
http://www.microserfs.net/HFR/petrus/japtounet.gif http://www.microserfs.net/HFR/petrus/japtounet.gif http://www.microserfs.net/HFR/petrus/japtounet.gif


---------------
from here and there -- \o__________________________________ -- la révolution de la terre, en silence
n°844422
uriel
blood pt.2
Posté le 07-09-2004 à 18:28:50  profilanswer
 
n°844429
simogeo
j'ai jamais tué de chats, ...
Posté le 07-09-2004 à 18:39:56  profilanswer
 

uriel a écrit :

un avant gout http://img72.exs.cx/img72/3487/kahn21.gif
 
(vive le graphisme \o/)


 
[:ddr555]


---------------
from here and there -- \o__________________________________ -- la révolution de la terre, en silence
n°844463
drasche
Posté le 07-09-2004 à 19:26:27  profilanswer
 

Mr Mala a écrit :

aimer != fan ! ... moi aussi, j'aime bien ... mais de là à avoir envie de pondre un codage md5 .................. :D


bin pourquoi pas? [:ddr555]


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
n°844478
Loom the G​loom
Even coders get the blues...
Posté le 07-09-2004 à 20:00:16  profilanswer
 

Harkonnen a écrit :

koo koo [:dawa]
j'ai recodé mon md5 [:petrus75]

Code :
  1. %include "common.inc"
  2. ;%define LOOPS   2097152
  3. ;%define LOOPS   1000000
  4. ;%define UNROLL  8
  5. %define DO_P4                   1
  6. %if DO_P4
  7. %define USE_PSHUFD              0
  8. %define USE_PSHUFD_ROL          1               ; On P4's doing a PSHUFD is faster than a MOVDQA in some circumstances.
  9. %define CACHE_LINE_SIZE         64
  10. %else
  11. %define USE_PSHUFD              0
  12. %define USE_PSHUFD_ROL          0
  13. %define CACHE_LINE_SIZE         32
  14. %endif ; %if DO_P4
  15. %define PHASE1                  256
  16. %define PHASE2                  PHASE1 + 64
  17. %define S11 7
  18. %define S12 12
  19. %define S13 17
  20. %define S14 22
  21. %define S21 5
  22. %define S22 9
  23. %define S23 14
  24. %define S24 20
  25. %define S31 4
  26. %define S32 11
  27. %define S33 16
  28. %define S34 23
  29. %define S41 6
  30. %define S42 10
  31. %define S43 15
  32. %define S44 21
  33. ; the macros we will use assume the triple-blocks are in
  34. ; XMM0-XMM3 and EAX,EBX,ECX,EDX and the input block is accessed via EBP [e.g. 16 64-bit words and 16 32bit words]
  35. ; called as A,B,C,D,a,b,c,d,rot,text_index1,text_index2,sin_index,constant1,constant2,PHASE
  36. ;#define F(b, c, d) ((b & c) | (~b & d))
  37. ;#define F(b, c, d) (d ^ (b & (c ^ d)))
  38. ;  (a) += F ((b), (c), (d)) + (x) + (uns32)(ac); \
  39. ;  (a) = ROLuns32((a), (s)); \
  40. ;  (a) += (b);
  41. ;;   FF  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX,S11, 0, 0,0d76aa478h
  42. ;;   FF  XMM3,XMM0,XMM1,XMM2, EDX,EAX,EBX,ECX,S12, 1, 1,0e8c7b756h
  43. ;    Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  44. %macro Ff 18
  45. %define A               %1
  46. %define B               %2
  47. %define C               %3
  48. %define D               %4
  49. %define a               %5
  50. %define b               %6
  51. %define c               %7
  52. %define d               %8
  53. %define mmxrot          %9
  54. %define alurot1         %10
  55. %define alurot2         %11
  56. %define mmxtext_index   %12
  57. %define alutext_index1  %13
  58. %define alutext_index2  %14
  59. %define sin_index       %15
  60. %define constant1       %16
  61. %define constant2       %17
  62. %define PHASE           %18
  63. %define a2              d
  64. %define b2              a
  65. %define c2              b
  66. %define d2              c
  67. ;try switching the above PADDD with the SIN_INDEX PADDD, to spread out the memory accesses more.
  68.    MOVDQA  XMM4, C                                  ; load c
  69.     MOV   ESI, c                                 ; load c : u32
  70.     mov   edi,[EBP + alutext_index1 * 4 + PHASE] ; load x : u32
  71.    PADDD A, [EBP + mmxtext_index * 16]            ; A = A + x
  72.     XOR   ESI, d                                 ; c ^ d : u32
  73.     add   a, edi                                 ; a = a + x
  74.    PXOR  XMM4, D                                  ; c ^ d
  75.     AND   ESI,b                                  ; b & (c ^ d) : u32
  76.     ADD   a,  constant1                          ; add the constants, sin values, a = a + x + ac : u32
  77.    PAND  XMM4, B                                  ; b & (c ^ d)
  78.     XOR   ESI, d                                 ; d ^ (b & (c ^ d)) : u32
  79.     ADD   a,ESI                                  ; add to a, a = a + F(b, c, d) + x + ac : u32
  80.    PADDD A, [_sin_const + sin_index * 16]         ; add the constants, sin values, x + ac
  81.     ROL   a, alurot1                             ; rotate left : u32
  82.     MOV   ESI, c2                                ; load c : u32
  83.    PXOR  XMM4, D                                  ; d ^ (b & (c ^ d))
  84.     ADD   a, b                                   ; add b : u32
  85.     mov   edi,[EBP + alutext_index2 * 4 + PHASE] ; load x : u32
  86.    PADDD A,XMM4                                   ; add to a, a = a + F(b,c,d) + x + ac
  87.     XOR   ESI, d2                                ; c & d : u32
  88.     add   a2, edi                                ; a = a + x : u32
  89.    ; ROT not native to XMMX
  90. %if USE_PSHUFD_ROL
  91.    PSHUFD XMM6, A, 11100100b
  92. %else
  93.    MOVDQA  XMM6, A                                  ; store a
  94. %endif ; %if USE_PSHUFD_ROL
  95.     AND   ESI,b2                                 ; b & (c ^ d) : u32
  96.     ADD   a2,  constant2                         ; add the constants, sin values, x + ac : u32
  97.    PSLLD A, mmxrot                               ; shift a left
  98.     XOR   ESI, d2                                ; d ^ (b & (c ^ d)) : u32
  99.     ADD   a2,ESI                                 ; add to a, a = a + F(b, c, d) + x + ac : u32
  100.    PSRLD XMM6,32-mmxrot                           ; shift XMM4 right
  101.     ROL   a2, alurot2                            ; rotate left : u32
  102.     ADD   a2, b2                                 ; add b : u32
  103.    POR   A,XMM6                                   ; OR together
  104.    PADDD A, B                                    ; add b
  105. %endmacro
  106. ; the macros we will use assume the triple-blocks are in
  107. ; XMM0-XMM3 and EAX,EBX,ECX,EDX and the input block is accessed via EBP [e.g. 16 64-bit words and 16 32bit words]
  108. ; called as A,B,C,D,a,b,c,d,rot,text_index1,text_index2,sin_index,constant1,constant2,PHASE
  109. ;#define F(b, c, d) ((b & c) | (~b & d))
  110. ;#define F(b, c, d) (d ^ (b & (c ^ d)))
  111. ;  (a) += F ((b), (c), (d)) + (x) + (uns32)(ac); \
  112. ;  (a) = ROLuns32((a), (s)); \
  113. ;  (a) += (b);
  114. ;;   FF  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX,S11, 0, 0,0d76aa478h
  115. ;;   FF  XMM3,XMM0,XMM1,XMM2, EDX,EAX,EBX,ECX,S12, 1, 1,0e8c7b756h
  116. ;    Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  117. %macro Fg 18
  118. %define A               %1
  119. %define B               %2
  120. %define C               %3
  121. %define D               %4
  122. %define a               %5
  123. %define b               %6
  124. %define c               %7
  125. %define d               %8
  126. %define mmxrot          %9
  127. %define alurot1         %10
  128. %define alurot2         %11
  129. %define mmxtext_index   %12
  130. %define alutext_index1  %13
  131. %define alutext_index2  %14
  132. %define sin_index       %15
  133. %define constant1       %16
  134. %define constant2       %17
  135. %define PHASE           %18
  136. %define a2              d
  137. %define b2              a
  138. %define c2              b
  139. %define d2              c
  140.    MOVDQA  XMM4, C                                   ; load c
  141.     mov   esi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  142.     MOV   EDI, d                                  ; load d : u32
  143.    PADDD A, [EBP + mmxtext_index * 16]             ; A = A + X
  144.     add a, esi                                    ; a = a + x
  145.     NOT   EDI                                     ; ~d
  146.    PXOR  XMM4, D                                   ; c ^ d
  147.     MOV   ESI, d                                  ; load d : u32
  148.     AND  EDI, c                                   ; ~d & c : u32
  149.    PAND  XMM4, B                                   ; b & (c ^ d)
  150.     AND   ESI, b                                  ; b & d : u32
  151.     ADD   a,  constant1                           ; add the constants, sin values, x + ac : u32
  152.    PADDD A, [_sin_const + sin_index * 16]          ; add the constants, sin values, x + ac
  153.     OR    ESI, EDI                                ; G(b,c,d) = (b & d) | (~d & c)
  154.     ADD  a, ESI                                   ; add together, G(b,c,d) + x + ac : u32
  155.    PXOR  XMM4, D                                   ; d ^ (b & (c ^ d))
  156.     ROL  a, alurot1                               ; rotate left : u32
  157.     ADD a, b                                      ; add b : u32
  158.    PADDD A,XMM4                                    ; add to a, a = a + F(b,c,d) + x + ac
  159.     mov   esi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  160.     MOV   EDI, d2                                 ; load d : u32
  161.    ; ROT not native to XMMX
  162. %if USE_PSHUFD_ROL
  163.    PSHUFD XMM6, A, 11100100b
  164. %else
  165.    MOVDQA  XMM6, A                                   ; store a
  166. %endif ; %if USE_PSHUFD_ROL
  167.     add a2, esi
  168.     NOT   EDI                                     ; ~d
  169.    PSLLD A, mmxrot                                ; shift a left
  170.     MOV   ESI, d2                                 ; load d : u32
  171.     AND  EDI, c2                                  ; ~d & c : u32
  172.    PSRLD XMM6,32-mmxrot                            ; shift XMM4 right
  173.     AND   ESI, b2                                 ; b & d : u32
  174.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  175.    POR   A,XMM6                                    ; OR together
  176.     OR    ESI, EDI                                ; G(b,c,d) = (b & d) | (~d & c)
  177.     ADD  a2, ESI                                  ; add together, G(b,c,d) + x + ac : u32
  178.    PADDD A, B                                     ; add b
  179.     ROL  a2, alurot2                              ; rotate left : u32
  180.     ADD a2, b2                                    ; add b : u32
  181. %endmacro
  182. ;#define G(b, c, d) ((b & d) | (c & ~d))
  183. ;#define G(b, c, d) (c ^ (d & (b ^ c)))
  184. ;  (a) += G ((b), (c), (d)) + (x) + (uns32)(ac); \
  185. ;  (a) = ROLuns32((a), (s)); \
  186. ;  (a) += (b);
  187. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  188. %macro Gh 18
  189. %define A               %1
  190. %define B               %2
  191. %define C               %3
  192. %define D               %4
  193. %define a               %5
  194. %define b               %6
  195. %define c               %7
  196. %define d               %8
  197. %define mmxrot          %9
  198. %define alurot1         %10
  199. %define alurot2         %11
  200. %define mmxtext_index   %12
  201. %define alutext_index1  %13
  202. %define alutext_index2  %14
  203. %define sin_index       %15
  204. %define constant1       %16
  205. %define constant2       %17
  206. %define PHASE           %18
  207. %define a2              d
  208. %define b2              a
  209. %define c2              b
  210. %define d2              c
  211.    MOVDQA  XMM4, D                                 ; load d
  212.     mov edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  213.    MOVDQA  XMM5, D                                 ; load d
  214.     MOV   ESI, d                                ; load d : u32
  215.     ADD   a, edi                                ; a = a + x
  216.    PADDD A, [EBP + mmxtext_index * 16]           ; A = A + X
  217.     XOR   ESI, c                                ; d ^ c : u32
  218.     ADD   a,  constant1                         ; add the constants, sin values, x + ac : u32
  219.    PXOR  XMM5, [_all_one]                        ; ~d
  220.     XOR   ESI, b                                ; H(b,c,d) = (b ^ c ^ d) : u32
  221.     ADD a, ESI                                  ; add to a, a = a + H(b,c,d) + x + ac : u32
  222.    PAND  XMM4, B                                 ; b & d
  223.     ROL  a, alurot1                             ; rotate left : u32
  224.    PAND  XMM5, C                                 ; ~d & c
  225.     ADD a, b                                    ; add b : u32
  226.    PADDD A, [_sin_const + sin_index * 16]        ; add the constants, sin values, x + ac
  227.     mov edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  228.    POR   XMM4, XMM5                               ; (b & d) | (~d & c)
  229.     MOV   ESI, d2                               ; load d : u32
  230.     ADD   a2, edi                               ; load the text, x : u32
  231.    PADDD A, XMM4                                 ; add together, G(b,c,d) + x + ac
  232.     XOR   ESI, c2                               ; d ^ c : u32
  233.     ADD   a2,  constant2                        ; add the constants, sin values, x + ac : u32
  234.    ; ROT not native to XMMX
  235. %if USE_PSHUFD_ROL
  236.    PSHUFD XMM6, A, 11100100b
  237. %else
  238.    MOVDQA  XMM6, A                                 ; store a
  239. %endif ; %if USE_PSHUFD_ROL
  240.     XOR   ESI, b2                               ; H(b,c,d) = (b ^ c ^ d) : u32
  241.     ADD a2, ESI                                 ; add to a, a = a + H(b,c,d) + x + ac : u32
  242.    PSLLD A, mmxrot                              ; shift a left
  243.     ROL  a2, alurot2                            ; rotate left : u32
  244.    PSRLD XMM6, 32-mmxrot                         ; shift XMM4 right
  245.     ADD a2, b2                                  ; add b : u32
  246.    POR   A, XMM6                                 ; OR together
  247.    PADDD A, B                                   ; add b
  248. %endmacro
  249. ;#define G(b, c, d) ((b & d) | (c & ~d))
  250. ;#define G(b, c, d) (c ^ (d & (b ^ c)))
  251. ;  (a) += G ((b), (c), (d)) + (x) + (uns32)(ac); \
  252. ;  (a) = ROLuns32((a), (s)); \
  253. ;  (a) += (b);
  254. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  255. %macro Gi 18
  256. %define A               %1
  257. %define B               %2
  258. %define C               %3
  259. %define D               %4
  260. %define a               %5
  261. %define b               %6
  262. %define c               %7
  263. %define d               %8
  264. %define mmxrot          %9
  265. %define alurot1         %10
  266. %define alurot2         %11
  267. %define mmxtext_index   %12
  268. %define alutext_index1  %13
  269. %define alutext_index2  %14
  270. %define sin_index       %15
  271. %define constant1       %16
  272. %define constant2       %17
  273. %define PHASE           %18
  274. %define a2              d
  275. %define b2              a
  276. %define c2              b
  277. %define d2              c
  278. ;#define I(x, y, z) ((y) ^ ((x) | (~z)))
  279. ;#define II(a, b, c, d, x, s, ac)
  280. ;%if 0
  281.    MOVDQA  XMM4, D                                   ; load d
  282.     MOV   ESI, d                                  ; load d : u32
  283.     mov   edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  284.    MOVDQA  XMM5, D                                   ; load d
  285.     NOT   ESI                                     ; ~d : u32
  286.     ADD   a, edi                                  ; a = a + x
  287.    PADDD A, [_sin_const + sin_index * 16]          ; A = A + AC
  288.     OR    ESI, b                                  ; b | ~d : u32
  289.     ADD   a,  constant1                           ; a = a + x + ac
  290.    PXOR  XMM5, [_all_one]                          ; ~d
  291.     XOR  ESI,c                                    ; I(b,c,d) = c ^ (b | ~d) : u32
  292.     ADD a, ESI                                    ; add to a, a = a + I(b,c,d) + x + ac : u32
  293.    PAND  XMM4, B                                   ; b & d
  294.     ROL  a, alurot1                               ; rotate left : u32
  295.    PAND  XMM5, C                                   ; ~d & c
  296.     MOV   ESI, d2                                 ; load d : u32
  297.     ADD a, b                                      ; add b : u32
  298.    PADDD A, [EBP + mmxtext_index * 16]             ; A = A + AC + X
  299.     mov   edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  300.     NOT   ESI                                     ; ~d : u32
  301.    POR   XMM4, XMM5                                 ; (b & d) | (~d & c)
  302.     ADD   a2, edi                                 ; a = a + x
  303.     OR    ESI, b2                                 ; b | ~d : u32
  304.    PADDD A, XMM4                                   ; add together, G(b,c,d) + x + ac
  305.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  306.     XOR  ESI,c2                                   ; I(b,c,d) = c ^ (b | ~d) : u32
  307.  
  308.    ; ROT not native to XMMX
  309. %if USE_PSHUFD_ROL
  310.    PSHUFD XMM6, A, 11100100b
  311. %else
  312.    MOVDQA  XMM6, A                                   ; store a
  313. %endif ; %if USE_PSHUFD_ROL
  314.     ADD a2,ESI                                    ; add to a, a = a + I(b,c,d) + x + ac : u32
  315.    PSLLD A, mmxrot                                ; shift a left
  316.     ROL  a2, alurot2                              ; rotate left : u32
  317.    PSRLD XMM6, 32-mmxrot                           ; shift XMM4 right
  318.     ADD a2, b2                                    ; add b : u32
  319.    POR   A, XMM6                                   ; OR together
  320.    PADDD A, B                                     ; add b
  321. %endmacro
  322. ;#define H(x, y, z) ((x) ^ (y) ^ (z))
  323. ;#define HH(a, b, c, d, x, s, ac) \
  324. ;  (a) += H ((b), (c), (d)) + (x) + (uns32)(ac); \
  325. ;  (a) = ROLuns32((a), (s)); \
  326. ;  (a) += (b);
  327. ;  Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  328. %macro Hf 18
  329. %define A               %1
  330. %define B               %2
  331. %define C               %3
  332. %define D               %4
  333. %define a               %5
  334. %define b               %6
  335. %define c               %7
  336. %define d               %8
  337. %define mmxrot          %9
  338. %define alurot1         %10
  339. %define alurot2         %11
  340. %define mmxtext_index   %12
  341. %define alutext_index1  %13
  342. %define alutext_index2  %14
  343. %define sin_index       %15
  344. %define constant1       %16
  345. %define constant2       %17
  346. %define PHASE           %18
  347. %define a2              d
  348. %define b2              a
  349. %define c2              b
  350. %define d2              c
  351.    MOVDQA  XMM4, D                                  ; load d
  352.     MOV   ESI, c                                 ; load c : u32
  353.     mov   edi,[EBP + alutext_index1 * 4 + PHASE] ; load x
  354.    PADDD A, [EBP + mmxtext_index * 16]            ; A = A + X
  355.     XOR   ESI, d                                 ; c ^ d : u32
  356.     add a, edi                                   ; a = a + x
  357.    PXOR  XMM4, C                                  ; d ^ c
  358.     AND   ESI,b                                  ; b & (c ^ d) : u32
  359.     ADD   a,  constant1                          ; add the constants, sin values, x + ac : u32
  360.    PADDD A, [_sin_const + sin_index * 16]         ; add the constants, sin values, x + ac
  361.     XOR   ESI, d                                 ; d ^ (b & (c ^ d)) : u32
  362.     ADD   a, ESI                                 ; add to a, a = a + F(b, c, d) + x + ac : u32
  363.    PXOR  XMM4, B                                  ; H(b,c,d) = (b ^ c ^ d)
  364.     MOV   ESI, c2                                ; load c : u32
  365.     ROL   a, alurot1                             ; rotate left : u32
  366.    PADDD A, XMM4                                  ; add to a, a = a + H(b,c,d) + x + ac
  367.     mov   edi,[EBP + alutext_index2 * 4 + PHASE] ; load x
  368.     ADD   a, b                                   ; add b : u32
  369.    ; ROT not native to XMMX
  370. %if USE_PSHUFD_ROL
  371.    PSHUFD XMM6, A, 11100100b
  372. %else
  373.    MOVDQA  XMM6, A                                  ; store a
  374. %endif ; %if USE_PSHUFD_ROL
  375.     XOR   ESI, d2                                ; c & d : u32
  376.     add a2, edi                                  ; a = a + x : u32
  377.    PSLLD A, mmxrot                               ; shift a left
  378.     AND   ESI,b2                                 ; b & (c ^ d) : u32
  379.     ADD   a2,  constant2                         ; a = a + x + ac : u32
  380.    PSRLD XMM6,32-mmxrot                           ; shift XMM4 right
  381.     XOR   ESI, d2                                ; d ^ (b & (c ^ d)) : u32
  382.     ADD   a2, ESI                                ; add to a, a = a + F(b, c, d) + x + ac : u32
  383.    POR   A,XMM6                                   ; OR together
  384.     ROL   a2, alurot2                            ; rotate left : u32
  385.    PADDD A, B                                    ; a = a + b
  386.     ADD   a2, b2                                 ; add b : u32
  387. %endmacro
  388. ;#define H(x, y, z) ((x) ^ (y) ^ (z))
  389. ;#define HH(a, b, c, d, x, s, ac) \
  390. ;  (a) += H ((b), (c), (d)) + (x) + (uns32)(ac); \
  391. ;  (a) = ROLuns32((a), (s)); \
  392. ;  (a) += (b);
  393. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  394. %macro Hg 18
  395. %define A               %1
  396. %define B               %2
  397. %define C               %3
  398. %define D               %4
  399. %define a               %5
  400. %define b               %6
  401. %define c               %7
  402. %define d               %8
  403. %define mmxrot          %9
  404. %define alurot1         %10
  405. %define alurot2         %11
  406. %define mmxtext_index   %12
  407. %define alutext_index1  %13
  408. %define alutext_index2  %14
  409. %define sin_index       %15
  410. %define constant1       %16
  411. %define constant2       %17
  412. %define PHASE           %18
  413. %define a2              d
  414. %define b2              a
  415. %define c2              b
  416. %define d2              c
  417.    MOVDQA  XMM4, D                                   ; load d
  418.     mov   esi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  419.     MOV   EDI, c                                  ; load c : u32
  420.    PADDD A, [EBP + mmxtext_index * 16]             ; load the text, x
  421.     add   a, esi                                  ; a = a + x
  422.     XOR   EDI, b                                  ; b ^ c
  423.    PXOR   XMM4, C                                  ; d ^ c
  424.     ADD   a, constant1                            ; add the constants, sin values, x + ac : u32
  425.     AND   EDI, d                                  ; d & (b ^ c)
  426.    PADDD A, [_sin_const + sin_index * 16]          ; add the constants, sin values, x + ac
  427.     XOR  EDI, c                                   ; G(b,c,d) = c ^ (d & (b ^ c))
  428.     mov   esi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  429.    PXOR  XMM4, B                                   ; H(b,c,d) = (b ^ c ^ d)
  430.     ADD  a, EDI                                   ; add together, G(b,c,d) + x + ac : u32
  431.     ROL a, alurot1                                ; a = a ROL ?
  432.    PADDD A, XMM4                                   ; add to a, a = a + H(b,c,d) + x + ac
  433.     MOV   EDI, c2                                 ; load c : u32
  434.     ADD  a, b                                     ; a = a + b
  435.    ; ROT not native to XMMX
  436. %if USE_PSHUFD_ROL
  437.    PSHUFD XMM6, A, 11100100b
  438. %else
  439.    MOVDQA  XMM6, A                                   ; store a
  440. %endif ; %if USE_PSHUFD_ROL
  441.     XOR EDI, b2                                   ; c ^ b
  442.     add a2, esi                                   ; a = a + x
  443.    PSLLD A, mmxrot                                ; shift a left
  444.     AND  EDI, d2                                  ; d & (c ^ b)
  445.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  446.    PSRLD XMM6,32-mmxrot                            ; shift XMM6 right
  447.     XOR  EDI, c2                                 ; G(b,c,d) = c ^ (d & (b ^ c)) = (b & d) | (~d & c)
  448.     ADD  a2, EDI                                  ; add together, G(b,c,d) + x + ac : u32
  449.    POR   A,XMM6                                    ; OR together
  450.     ROL  a2, alurot2                              ; rotate left : u32
  451.     ADD a2, b2                                    ; add b : u32
  452.    PADDD A, B                                     ; add b
  453. %endmacro
  454. ;#define I(x, y, z) ((y) ^ ((x) | (~z)))
  455. ;#define II(a, b, c, d, x, s, ac) \
  456. ;  (a) += I ((b), (c), (d)) + (x) + (uns32)(ac); \
  457. ;  (a) = ROLuns32((a), (s)); \
  458. ;  (a) += (b);
  459. ;   Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  460. %macro Ih 18
  461. %define A               %1
  462. %define B               %2
  463. %define C               %3
  464. %define D               %4
  465. %define a               %5
  466. %define b               %6
  467. %define c               %7
  468. %define d               %8
  469. %define mmxrot          %9
  470. %define alurot1         %10
  471. %define alurot2         %11
  472. %define mmxtext_index   %12
  473. %define alutext_index1  %13
  474. %define alutext_index2  %14
  475. %define sin_index       %15
  476. %define constant1       %16
  477. %define constant2       %17
  478. %define PHASE           %18
  479. %define a2              d
  480. %define b2              a
  481. %define c2              b
  482. %define d2              c
  483.    MOVDQA  XMM4, D                                 ; load d
  484.     mov edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  485.     MOV   ESI, d                                ; load d : u32
  486.    PXOR  XMM4,[_all_one]                         ; ~d
  487.     ADD   a, edi                                ; load the text, x : u32
  488.     XOR   ESI, c                                ; d ^ c : u32
  489.    PADDD A, [EBP + mmxtext_index * 16]           ; load the text, x
  490.     ADD   a,  constant1                         ; add the constants, sin values, x + ac : u32
  491.     XOR   ESI, b                                ; H(b,c,d) = (b ^ c ^ d) : u32
  492.    POR   XMM4, B                                 ; b | ~d
  493.     ADD a, ESI                                  ; add to a, a = a + H(b,c,d) + x + ac : u32
  494.     ROL  a, alurot1                             ; rotate left : u32
  495.    PADDD A, [_sin_const + sin_index * 16]        ; add the constants, sin values, x + ac
  496.     ADD a, b                                    ; add b : u32
  497.     mov edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  498.    PXOR XMM4,C                                   ; c ^ (b | ~d)
  499.     MOV   ESI, d2                               ; load d : u32
  500.     ADD   a2, edi                               ; load the text, x : u32
  501.    PADDD A,XMM4                                  ; add to a, a = a + I(b,c,d) + x + ac
  502.     XOR   ESI, c2                               ; d ^ c : u32
  503.     ADD   a2,  constant2                        ; add the constants, sin values, x + ac : u32
  504.    ; ROT not native to XMMX
  505. %if USE_PSHUFD_ROL
  506.    PSHUFD XMM6, A, 11100100b
  507. %else
  508.    MOVDQA  XMM6, A                                 ; store a
  509. %endif ; %if USE_PSHUFD_ROL
  510.     XOR   ESI, b2                               ; H(b,c,d) = (b ^ c ^ d) : u32
  511.    PSLLD A, mmxrot                              ; shift a left
  512.     ADD a2, ESI                                 ; add to a, a = a + H(b,c,d) + x + ac : u32
  513.    PSRLD XMM6,32-mmxrot                          ; shift XMM4 right
  514.     ROL  a2, alurot2                            ; rotate left : u32
  515.    POR   A,XMM6                                  ; OR together
  516.     ADD a2, b2                                  ; a = a + b
  517.    PADDD A, B                                   ; a = a + b
  518. %endmacro
  519. ;#define I(x, y, z) (y ^ (x | ~z))
  520. ;#define II(a, b, c, d, x, s, ac) \
  521. ;  (a) += I ((b), (c), (d)) + (x) + (uns32)(ac); \
  522. ;  (a) = ROLuns32((a), (s)); \
  523. ;  (a) += (b);
  524. ;  Ff  XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, mmxrot,alurot1,alurot2 mmxtext,alutext1,alutext2,sin_text, 0d76aa478h,0e8c7b756h,PHASE
  525. %macro Ii 18
  526. %define A               %1
  527. %define B               %2
  528. %define C               %3
  529. %define D               %4
  530. %define a               %5
  531. %define b               %6
  532. %define c               %7
  533. %define d               %8
  534. %define mmxrot          %9
  535. %define alurot1         %10
  536. %define alurot2         %11
  537. %define mmxtext_index   %12
  538. %define alutext_index1  %13
  539. %define alutext_index2  %14
  540. %define sin_index       %15
  541. %define constant1       %16
  542. %define constant2       %17
  543. %define PHASE           %18
  544. %define a2              d
  545. %define b2              a
  546. %define c2              b
  547. %define d2              c
  548.    MOVDQA  XMM4, D                                   ; load d
  549.     MOV   ESI, d                                  ; load d : u32
  550.     mov   edi, [EBP + alutext_index1 * 4 + PHASE] ; load the text, x : u32
  551.    PXOR  XMM4,[_all_one]                           ; ~d
  552.     NOT   ESI                                     ; ~d : u32
  553.     ADD   a, edi                                  ; a = a + x
  554.    PADDD A, [EBP + mmxtext_index * 16]             ; a = a + x
  555.     OR    ESI, b                                  ; b | ~d : u32
  556.     ADD   a,  constant1                           ; add the constants, sin values, x + ac : u32
  557.    POR   XMM4, B                                   ; b | ~d
  558.     XOR  ESI, c                                   ; I(b,c,d) = c ^ (b | ~d) : u32
  559.     ADD a, ESI                                    ; add to a, a = a + I(b,c,d) + x + ac : u32
  560.    PADDD A, [_sin_const + sin_index * 16]          ; add the constants, sin values, x + ac
  561.     MOV   ESI, d2                                 ; load d : u32
  562.     ROL  a, alurot1                               ; rotate left : u32
  563.    PXOR XMM4, C                                    ; I(b,c,d) = c ^ (b | ~d)
  564.     mov   edi, [EBP + alutext_index2 * 4 + PHASE] ; load the text, x : u32
  565.     ADD a, b                                      ; add b : u32
  566.    PADDD A,XMM4                                    ; add to a, a = a + I(b,c,d) + x + ac
  567.     NOT   ESI                                     ; ~d : u32
  568.     ADD   a2, edi                                 ; a + x
  569.    ; ROT not native to XMMX
  570. %if USE_PSHUFD_ROL
  571.    PSHUFD XMM6, A, 11100100b
  572. %else
  573.    MOVDQA  XMM6, A                                   ; store a
  574. %endif ; %if USE_PSHUFD_ROL
  575.     OR    ESI, b2                                 ; b | ~d : u32
  576.     ADD   a2,  constant2                          ; add the constants, sin values, x + ac : u32
  577.    PSLLD A, mmxrot                                ; shift a left
  578.     XOR  ESI, c2                                  ; I(b,c,d) = c ^ (b | ~d) : u32
  579.    PSRLD XMM6,32-mmxrot                            ; shift XMM4 right
  580.     ADD a2, ESI                                   ; add to a, a = a + I(b,c,d) + x + ac : u32
  581.    POR   A,XMM6                                    ; OR together
  582.     ROL  a2, alurot2                              ; rotate left : u32
  583.    PADDD A, B                                     ; add b
  584.     ADD a2, b2                                    ; add b : u32
  585. %endmacro
  586. [bits 32]
  587. [section .text align=64]
  588.    
  589. [global _md5_x86_u32sse2_2_transform]
  590. ; void _md5_x86_u32sse2_2_transform(uns32 *md, const uns32 *msg)
  591. _md5_x86_u32sse2_2_transform:
  592.    PUSHAD
  593.    MOV EBP,[ESP+36]            ; source message
  594.    ; load inital block into XMM0-XMM3
  595.    MOVDQA XMM0,[_initial_state+ 0]
  596.    MOVDQA XMM1,[_initial_state+16]
  597.    MOVDQA XMM2,[_initial_state+32]
  598.    MOVDQA XMM3,[_initial_state+48]
  599.    ; load inital block into EAX,EBX,ECX,EDX
  600.    ;the Input Block is at EBP+PHASE1
  601.    MOV EAX,067452301h
  602.    MOV EBX,0efcdab89h
  603.    MOV ECX,098badcfeh
  604.    MOV EDX,010325476h
  605.    ; do FF rounds
  606.    Ff XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S11,S12, 00,00,01, 00, 0d76aa478h,0e8c7b756h, PHASE1
  607.    Ff XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S13,S14, 01,02,03, 01, 0242070dbh,0c1bdceeeh, PHASE1
  608.    Ff XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S11,S12, 02,04,05, 02, 0f57c0fafh,04787c62ah, PHASE1
  609.    Ff XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S13,S14, 03,06,07, 03, 0a8304613h,0fd469501h, PHASE1
  610.    Ff XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S11,S12, 04,08,09, 04, 0698098d8h,08b44f7afh, PHASE1
  611.    Ff XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S13,S14, 05,10,11, 05, 0ffff5bb1h,0895cd7beh, PHASE1
  612.    Ff XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S11,S12, 06,12,13, 06, 06b901122h,0fd987193h, PHASE1
  613.    Ff XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S13,S14, 07,14,15, 07, 0a679438eh,049b40821h, PHASE1
  614.    Fg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S21,S22, 08,01,06, 08, 0f61e2562h,0c040b340h, PHASE1
  615.    Fg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S23,S24, 09,11,00, 09, 0265e5a51h,0e9b6c7aah, PHASE1
  616.    Fg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S21,S22, 10,05,10, 10, 0d62f105dh,002441453h, PHASE1
  617.    Fg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S23,S24, 11,15,04, 11, 0d8a1e681h,0e7d3fbc8h, PHASE1
  618.    Fg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S11,S21,S22, 12,09,14, 12, 021e1cde6h,0c33707d6h, PHASE1
  619.    Fg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S12,S23,S24, 13,03,08, 13, 0f4d50d87h,0455a14edh, PHASE1
  620.    Fg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S13,S21,S22, 14,13,02, 14, 0a9e3e905h,0fcefa3f8h, PHASE1
  621.    Fg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S14,S23,S24, 15,07,12, 15, 0676f02d9h,08d2a4c8ah, PHASE1
  622.    ; do GG rounds
  623.    Gh XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S31,S32, 01,05,08, 16, 0fffa3942h,08771f681h, PHASE1
  624.    Gh XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S33,S34, 06,11,14, 17, 06d9d6122h,0fde5380ch, PHASE1
  625.    Gh XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S31,S32, 11,01,04, 18, 0a4beea44h,04bdecfa9h, PHASE1
  626.    Gh XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S33,S34, 00,07,10, 19, 0f6bb4b60h,0bebfbc70h, PHASE1
  627.    Gh XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S31,S32, 05,13,00, 20, 0289b7ec6h,0eaa127fah, PHASE1
  628.    Gh XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S33,S34, 10,03,06, 21, 0d4ef3085h,004881d05h, PHASE1
  629.    Gh XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S31,S32, 15,09,12, 22, 0d9d4d039h,0e6db99e5h, PHASE1
  630.    Gh XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S33,S34, 04,15,02, 23, 01fa27cf8h,0c4ac5665h, PHASE1
  631.    Gi XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S41,S42, 09,00,07, 24, 0f4292244h,0432aff97h, PHASE1
  632.    Gi XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S43,S44, 14,14,05, 25, 0ab9423a7h,0fc93a039h, PHASE1
  633.    Gi XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S41,S42, 03,12,03, 26, 0655b59c3h,08f0ccc92h, PHASE1
  634.    Gi XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S43,S44, 08,10,01, 27, 0ffeff47dh,085845dd1h, PHASE1
  635.    Gi XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S21,S41,S42, 13,08,15, 28, 06fa87e4fh,0fe2ce6e0h, PHASE1
  636.    Gi XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S22,S43,S44, 02,06,13, 29, 0a3014314h,04e0811a1h, PHASE1
  637.    Gi XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S23,S41,S42, 07,04,11, 30, 0f7537e82h,0bd3af235h, PHASE1
  638.    Gi XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S24,S43,S44, 12,02,09, 31, 02ad7d2bbh,0eb86d391h, PHASE1
  639.    ; final addition
  640.     ADD   EAX,067452301h          ;
  641.     ADD   EBX,0efcdab89h          ;
  642.     ADD   ECX,098badcfeh          ;
  643.     ADD   EDX,010325476h          ;
  644.     MOV  [EBP+PHASE1+ 0],EAX            ; 4bytes u32
  645.     MOV  [EBP+PHASE1+ 4],EBX            ; 4bytes u32
  646.     MOV  [EBP+PHASE1+ 8],ECX            ; 4bytes u32
  647.     MOV  [EBP+PHASE1+12],EDX            ; 4bytes u32
  648.    ; load inital block into EAX,EBX,ECX,EDX
  649.    ;the Input Block is at EBP+PHASE2
  650.    MOV EAX,067452301h
  651.    MOV EBX,0efcdab89h
  652.    MOV ECX,098badcfeh
  653.    MOV EDX,010325476h
  654. ; do HH rounds
  655.    Hf XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S11,S12, 05,00,01, 32, 0d76aa478h,0e8c7b756h, PHASE2
  656.    Hf XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S13,S14, 08,02,03, 33, 0242070dbh,0c1bdceeeh, PHASE2
  657.    Hf XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S11,S12, 11,04,05, 34, 0f57c0fafh,04787c62ah, PHASE2
  658.    Hf XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S13,S14, 14,06,07, 35, 0a8304613h,0fd469501h, PHASE2
  659.    Hf XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S11,S12, 01,08,09, 36, 0698098d8h,08b44f7afh, PHASE2
  660.    Hf XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S13,S14, 04,10,11, 37, 0ffff5bb1h,0895cd7beh, PHASE2
  661.    Hf XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S11,S12, 07,12,13, 38, 06b901122h,0fd987193h, PHASE2
  662.    Hf XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S13,S14, 10,14,15, 39, 0a679438eh,049b40821h, PHASE2
  663.    Hg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S21,S22, 13,01,06, 40, 0f61e2562h,0c040b340h, PHASE2
  664.    Hg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S23,S24, 00,11,00, 41, 0265e5a51h,0e9b6c7aah, PHASE2
  665.    Hg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S21,S22, 03,05,10, 42, 0d62f105dh,002441453h, PHASE2
  666.    Hg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S23,S24, 06,15,04, 43, 0d8a1e681h,0e7d3fbc8h, PHASE2
  667.    Hg XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S31,S21,S22, 09,09,14, 44, 021e1cde6h,0c33707d6h, PHASE2
  668.    Hg XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S32,S23,S24, 12,03,08, 45, 0f4d50d87h,0455a14edh, PHASE2
  669.    Hg XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S33,S21,S22, 15,13,02, 46, 0a9e3e905h,0fcefa3f8h, PHASE2
  670.    Hg XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S34,S23,S24, 02,07,12, 47, 0676f02d9h,08d2a4c8ah, PHASE2
  671.    ; do II rounds
  672.    Ih XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S31,S32, 00,05,08, 48, 0fffa3942h,08771f681h, PHASE2
  673.    Ih XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S33,S34, 07,11,14, 49, 06d9d6122h,0fde5380ch, PHASE2
  674.    Ih XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S31,S32, 14,01,04, 50, 0a4beea44h,04bdecfa9h, PHASE2
  675.    Ih XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S33,S34, 05,07,10, 51, 0f6bb4b60h,0bebfbc70h, PHASE2
  676.    Ih XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S31,S32, 12,13,00, 52, 0289b7ec6h,0eaa127fah, PHASE2
  677.    Ih XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S33,S34, 03,03,06, 53, 0d4ef3085h,004881d05h, PHASE2
  678.    Ih XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S31,S32, 10,09,12, 54, 0d9d4d039h,0e6db99e5h, PHASE2
  679.    Ih XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S33,S34, 01,15,02, 55, 01fa27cf8h,0c4ac5665h, PHASE2
  680.    Ii XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S41,S42, 08,00,07, 56, 0f4292244h,0432aff97h, PHASE2
  681.    Ii XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S43,S44, 15,14,05, 57, 0ab9423a7h,0fc93a039h, PHASE2
  682.    Ii XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S41,S42, 06,12,03, 58, 0655b59c3h,08f0ccc92h, PHASE2
  683.    Ii XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S43,S44, 13,10,01, 59, 0ffeff47dh,085845dd1h, PHASE2
  684.    Ii XMM0,XMM1,XMM2,XMM3, EAX,EBX,ECX,EDX, S41,S41,S42, 04,08,15, 60, 06fa87e4fh,0fe2ce6e0h, PHASE2
  685.    Ii XMM3,XMM0,XMM1,XMM2, ECX,EDX,EAX,EBX, S42,S43,S44, 11,06,13, 61, 0a3014314h,04e0811a1h, PHASE2
  686.    Ii XMM2,XMM3,XMM0,XMM1, EAX,EBX,ECX,EDX, S43,S41,S42, 02,04,11, 62, 0f7537e82h,0bd3af235h, PHASE2
  687.    Ii XMM1,XMM2,XMM3,XMM0, ECX,EDX,EAX,EBX, S44,S43,S44, 09,02,09, 63, 02ad7d2bbh,0eb86d391h, PHASE2
  688.    ; final addition
  689.    PADDD XMM0,[_initial_state+ 0]
  690.     ADD   EAX,067452301h          ;
  691.    PADDD XMM1,[_initial_state+16]
  692.     ADD   EBX,0efcdab89h          ;
  693.    PADDD XMM2,[_initial_state+32]
  694.     ADD   ECX,098badcfeh          ;
  695.    PADDD XMM3,[_initial_state+48]
  696.     ADD   EDX,010325476h          ;
  697. ; mark add 4
  698. ;MOV EBP,[ESP+36]               ; the digest destination, same as input source...faster this way
  699.    MOVDQA  [EBP+ 0],XMM0             ; 8bytes mmx
  700.    MOVDQA  [EBP+16],XMM1             ; 8bytes mmx
  701.    MOVDQA  [EBP+32],XMM2             ; 8bytes mmx
  702.    MOVDQA  [EBP+48],XMM3             ; 8bytes mmx
  703.     MOV  [EBP+PHASE2+ 0],EAX            ; 4bytes u32
  704.     MOV  [EBP+PHASE2+ 4],EBX            ; 4bytes u32
  705.     MOV  [EBP+PHASE2+ 8],ECX            ; 4bytes u32
  706.     MOV  [EBP+PHASE2+12],EDX            ; 4bytes u32
  707.    ; close up shop and return
  708. ;EXMMS
  709.    POPAD; EDI, ESI, EBP, nothing (placeholder for ESP), EBX, EDX, ECX and EAX. It reverses the operation of PUSHAD
  710.    RET
  711. [bits 32]
  712. [section .data align=64]
  713. ;buffer to make sure that code and data never share the same cache line.
  714. empty:
  715.    times 128 db 0
  716. align 16
  717. tempi:
  718.    times 64 dd 0
  719. tempo:
  720.    times 16  dd 0
  721. _all_one:
  722. times 4 DD 0ffffffffh
  723. _initial_state:
  724. times 4 DD 067452301h
  725. times 4 DD 0efcdab89h
  726. times 4 DD 098badcfeh
  727. times 4 DD 010325476h
  728. _sin_const:
  729.    times 4 DD 0d76aa478h
  730.    times 4 DD 0e8c7b756h
  731.    times 4 DD 0242070dbh
  732.    times 4 DD 0c1bdceeeh
  733.    times 4 DD 0f57c0fafh
  734.    times 4 DD 04787c62ah
  735.    times 4 DD 0a8304613h
  736.    times 4 DD 0fd469501h
  737.    times 4 DD 0698098d8h
  738.    times 4 DD 08b44f7afh
  739.    times 4 DD 0ffff5bb1h
  740.    times 4 DD 0895cd7beh
  741.    times 4 DD 06b901122h
  742.    times 4 DD 0fd987193h
  743.    times 4 DD 0a679438eh
  744.    times 4 DD 049b40821h
  745.    times 4 DD 0f61e2562h
  746.    times 4 DD 0c040b340h
  747.    times 4 DD 0265e5a51h
  748.    times 4 DD 0e9b6c7aah
  749.    times 4 DD 0d62f105dh
  750.    times 4 DD 002441453h
  751.    times 4 DD 0d8a1e681h
  752.    times 4 DD 0e7d3fbc8h
  753.    times 4 DD 021e1cde6h
  754.    times 4 DD 0c33707d6h
  755.    times 4 DD 0f4d50d87h
  756.    times 4 DD 0455a14edh
  757.    times 4 DD 0a9e3e905h
  758.    times 4 DD 0fcefa3f8h
  759.    times 4 DD 0676f02d9h
  760.    times 4 DD 08d2a4c8ah
  761.    times 4 DD 0fffa3942h
  762.    times 4 DD 08771f681h
  763.    times 4 DD 06d9d6122h
  764.    times 4 DD 0fde5380ch
  765.    times 4 DD 0a4beea44h
  766.    times 4 DD 04bdecfa9h
  767.    times 4 DD 0f6bb4b60h
  768.    times 4 DD 0bebfbc70h
  769.    times 4 DD 0289b7ec6h
  770.    times 4 DD 0eaa127fah
  771.    times 4 DD 0d4ef3085h
  772.    times 4 DD 004881d05h
  773.    times 4 DD 0d9d4d039h
  774.    times 4 DD 0e6db99e5h
  775.    times 4 DD 01fa27cf8h
  776.    times 4 DD 0c4ac5665h
  777.    times 4 DD 0f4292244h
  778.    times 4 DD 0432aff97h
  779.    times 4 DD 0ab9423a7h
  780.    times 4 DD 0fc93a039h
  781.    times 4 DD 0655b59c3h
  782.    times 4 DD 08f0ccc92h
  783.    times 4 DD 0ffeff47dh
  784.    times 4 DD 085845dd1h
  785.    times 4 DD 06fa87e4fh
  786.    times 4 DD 0fe2ce6e0h
  787.    times 4 DD 0a3014314h
  788.    times 4 DD 04e0811a1h
  789.    times 4 DD 0f7537e82h
  790.    times 4 DD 0bd3af235h
  791.    times 4 DD 02ad7d2bbh
  792.    times 4 DD 0eb86d391h


[:petrus75]


 
je quote pour la postérité [:petrus75]

n°844484
gm_superst​ar
Appelez-moi Super
Posté le 07-09-2004 à 20:16:44  profilanswer
 
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2  3  4  5  ..  5044  5045  5046  ..  26992  26993  26994  26995  26996  26997

Aller à :
Ajouter une réponse
 

Sujets relatifs
Plus de sujets relatifs à : [blabla@olympe] Le topic du modo, dieu de la fibre et du monde


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)