--- john-1.7.9/src/x86.S 2011-11-22 01:35:40 +0000 +++ x86.S 2012-03-21 08:57:29 +0000 @@ -797,15 +797,28 @@ #define HH(a, b, c, d, x, s, ac) \ movl c,tmp1; \ - addl tmp2,a; \ + addl x,a; \ xorl d,tmp1; \ - addl $ac,a; \ xorl b,tmp1; \ - movl x,tmp2; \ - addl tmp1,a; \ + leal ac(tmp1,a),a; \ roll $s,a; \ addl b,a +#define HH2(a, b, c, d, x1, x2, s1, s2, ac1, ac2) \ + movl c,tmp1; \ + addl x1,a; \ + xorl b,tmp1; \ + movl tmp1,tmp2; \ + xorl d,tmp1; \ + addl x2,d; \ + leal ac1(tmp1,a),a; \ + roll $s1,a; \ + addl b,a; \ + xorl a,tmp2; \ + leal ac2(tmp2,d),d; \ + roll $s2,d; \ + addl a,d + #define II(a, b, c, d, x, s, ac) \ xorl d,tmp2; \ addl x,a; \ @@ -905,33 +918,25 @@ andl a,tmp1 addl $0x8d2a4c8a,b xorl d,tmp1 - movl x(5),tmp2 addl tmp1,b roll $S24,b addl c,b /* Round 3 */ - HH (a, b, c, d, x( 8), S31, 0xfffa3942) /* 33 */ - HH (d, a, b, c, x(11), S32, 0x8771f681) /* 34 */ - HH (c, d, a, b, x(14), S33, 0x6d9d6122) /* 35 */ - HH (b, c, d, a, x( 1), S34, 0xfde5380c) /* 36 */ - HH (a, b, c, d, x( 4), S31, 0xa4beea44) /* 37 */ - HH (d, a, b, c, x( 7), S32, 0x4bdecfa9) /* 38 */ - HH (c, d, a, b, x(10), S33, 0xf6bb4b60) /* 39 */ - HH (b, c, d, a, x(13), S34, 0xbebfbc70) /* 40 */ - HH (a, b, c, d, x( 0), S31, 0x289b7ec6) /* 41 */ - HH (d, a, b, c, x( 3), S32, 0xeaa127fa) /* 42 */ - HH (c, d, a, b, x( 6), S33, 0xd4ef3085) /* 43 */ - HH (b, c, d, a, x( 9), S34, 0x4881d05) /* 44 */ - HH (a, b, c, d, x(12), S31, 0xd9d4d039) /* 45 */ - HH (d, a, b, c, x( 2), S32, 0xe6db99e5) /* 46 */ + HH2(a, b, c, d, x(5), x(8), S31, S32, 0xfffa3942, 0x8771f681) /* 33 */ + HH2(c, d, a, b, x(11), x(14), S33, S34, 0x6d9d6122, 0xfde5380c) /* 35 */ + HH2(a, b, c, d, x(1), x(4), S31, S32, 0xa4beea44, 0x4bdecfa9) /* 37 */ + HH2(c, d, a, b, x(7), x(10), S33, S34, 0xf6bb4b60, 0xbebfbc70) /* 39 */ + HH2(a, b, c, d, x(13), x(0), S31, S32, 0x289b7ec6, 0xeaa127fa) /* 41 */ + HH2(c, d, a, b, x(3), x(6), S33, S34, 0xd4ef3085, 0x04881d05) /* 43 */ + HH2(a, b, c, d, x(9), x(12), S31, S32, 0xd9d4d039, 0xe6db99e5) /* 45 */ movl a,tmp1 xorl b,tmp1 - addl $0x1fa27cf8,c xorl d,tmp1 - addl tmp1,c + movl $-1,tmp2 + leal 0x1fa27cf8(tmp1,c),c roll $S33,c addl d,c - HH (b, c, d, a, $-1, S34, 0xc4ac5665) /* 48 */ + HH (b, c, d, a, x( 2), S34, 0xc4ac5665) /* 48 */ /* Round 4 */ II (a, b, c, d, x( 0), S41, 0xf4292244) /* 49 */ II (d, a, b, c, x( 7), S42, 0x432aff97) /* 50 */