Project

General

Profile

Bug #2115 ยป bin-utils-2.22.patch

Theo Schlossnagle, 2012-02-16 07:33 PM

View differences:

usr/src/common/crypto/md5/amd64/md5_amd64.pl
49 49
    my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
50 50
    $code .= "	mov	0*4(%rsi),	%r10d		/* (NEXT STEP) X[0] */\n" if ($pos == -1);
51 51
    $code .= "	mov	%edx,		%r11d		/* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
52
    $T_i = sprintf("-0x%08x", (0xffffffff ^ hex($T_i))+1)
53
        if (hex($T_i) >= 0x80000000);
52 54

  
53 55
    $code .= <<EOF;
54 56
	xor	$y,		%r11d		/* y ^ ... */
55
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... */
57
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... r1 */
56 58
	and	$x,		%r11d		/* x & ... */
57 59
	xor	$z,		%r11d		/* z ^ ... */
58 60
	mov	$k_next*4(%rsi),%r10d		/* (NEXT STEP) X[$k_next] */
......
75 77
    $code .= "	mov	1*4(%rsi),	%r10d		/* (NEXT STEP) X[1] */\n" if ($pos == -1);
76 78
    $code .= "	mov	%edx,		%r11d		/* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
77 79
    $code .= "	mov	%edx,		%r12d		/* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
80
    $T_i = sprintf("-0x%08x", (0xffffffff ^ hex($T_i))+1)
81
        if (hex($T_i) >= 0x80000000);
78 82

  
79 83
    $code .= <<EOF;
80 84
	not	%r11d				/* not z */
81
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... */
85
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... r2 */
82 86
	and	$x,		%r12d		/* x & z */
83 87
	and	$y,		%r11d		/* y & (not z) */
84 88
	mov	$k_next*4(%rsi),%r10d		/* (NEXT STEP) X[$k_next] */
......
101 105
    my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
102 106
    $code .= "	mov	5*4(%rsi),	%r10d		/* (NEXT STEP) X[5] */\n" if ($pos == -1);
103 107
    $code .= "	mov	%ecx,		%r11d		/* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
108
    $T_i = sprintf("-0x%08x", (0xffffffff ^ hex($T_i))+1)
109
        if (hex($T_i) >= 0x80000000);
104 110

  
105 111
    $code .= <<EOF;
106
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... */
112
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... r3 */
107 113
	mov	$k_next*4(%rsi),%r10d		/* (NEXT STEP) X[$k_next] */
108 114
	xor	$z,		%r11d		/* z ^ ... */
109 115
	xor	$x,		%r11d		/* x ^ ... */
......
126 132
    $code .= "	mov	\$0xffffffff,	%r11d\n" if ($pos == -1);
127 133
    $code .= "	xor	%edx,		%r11d		/* (NEXT STEP) not z' = not %edx*/\n"
128 134
    if ($pos == -1);
135
    $T_i = sprintf("-0x%08x", (0xffffffff ^ hex($T_i))+1)
136
        if (hex($T_i) >= 0x80000000);
129 137

  
130 138
    $code .= <<EOF;
131
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... */
139
	lea	$T_i($dst,%r10d),$dst		/* Const + dst + ... r4 */
132 140
	or	$x,		%r11d		/* x | ... */
133 141
	xor	$y,		%r11d		/* y ^ ... */
134 142
	add	%r11d,		$dst		/* dst += ... */
usr/src/common/crypto/sha1/amd64/sha1-x86_64.pl
162 162
sub BODY_20_39 {
163 163
my ($i,$a,$b,$c,$d,$e,$f)=@_;
164 164
my $j=$i+1;
165
my $K=($i<40)?0x6ed9eba1:0xca62c1d6;
165
my $K=($i<40)?"0x6ed9eba1":"-0x359d3e2a";
166 166
$code.=<<___ if ($i<79);
167 167
	lea	$K($xi,$e),$f
168 168
	mov	`4*($j%16)`(%rsp),$xi
......
199 199
my ($i,$a,$b,$c,$d,$e,$f)=@_;
200 200
my $j=$i+1;
201 201
$code.=<<___;
202
	lea	0x8f1bbcdc($xi,$e),$f
202
	lea	-0x70e44324($xi,$e),$f
203 203
	mov	`4*($j%16)`(%rsp),$xi
204 204
	mov	$b,$t0
205 205
	mov	$b,$t1
usr/src/psm/stand/bootblks/ufs/i386/mboot.S
103 103
 * between two labels.  The ending label must be the same as the starting label
104 104
 * but with a suffix "_end".
105 105
 */
106
#define	SIZEOF(label)	(offset label##_end - offset label)
106
#define	SIZEOF(label)	(label##_end - label)
107 107

  
108 108

  
109 109
	.title	"Solaris_Master_Boot"
    (1-1/1)