mirror of
https://github.com/rust-lang/rust
synced 2024-10-03 07:14:34 +00:00
Auto merge of #30455 - mmcco:beautify-isaac, r=alexcrichton
Call me verbose, but the existing logic was hideously formatted. The result still fits in a small terminal. No functional change.
This commit is contained in:
commit
b9fd0ca16d
|
@ -77,14 +77,37 @@ fn init(&mut self, use_rsl: bool) {
|
|||
|
||||
macro_rules! mix {
|
||||
() => {{
|
||||
a=a^(b<<11); d=d+a; b=b+c;
|
||||
b=b^(c>>2); e=e+b; c=c+d;
|
||||
c=c^(d<<8); f=f+c; d=d+e;
|
||||
d=d^(e>>16); g=g+d; e=e+f;
|
||||
e=e^(f<<10); h=h+e; f=f+g;
|
||||
f=f^(g>>4); a=a+f; g=g+h;
|
||||
g=g^(h<<8); b=b+g; h=h+a;
|
||||
h=h^(a>>9); c=c+h; a=a+b;
|
||||
a = a ^ (b << 11);
|
||||
d = d + a;
|
||||
b = b + c;
|
||||
|
||||
b = b ^ (c >> 2);
|
||||
e = e + b;
|
||||
c = c + d;
|
||||
|
||||
c = c ^ (d << 8);
|
||||
f = f + c;
|
||||
d = d + e;
|
||||
|
||||
d = d ^ (e >> 16);
|
||||
g = g + d;
|
||||
e = e + f;
|
||||
|
||||
e = e ^ (f << 10);
|
||||
h = h + e;
|
||||
f = f + g;
|
||||
|
||||
f = f ^ (g >> 4);
|
||||
a = a + f;
|
||||
g = g + h;
|
||||
|
||||
g = g ^ (h << 8);
|
||||
b = b + g;
|
||||
h = h + a;
|
||||
|
||||
h = h ^ (a >> 9);
|
||||
c = c + h;
|
||||
a = a + b;
|
||||
}}
|
||||
}
|
||||
|
||||
|
@ -337,14 +360,37 @@ macro_rules! init {
|
|||
|
||||
macro_rules! mix {
|
||||
() => {{
|
||||
a=a-e; f=f^(h>>9); h=h+a;
|
||||
b=b-f; g=g^(a<<9); a=a+b;
|
||||
c=c-g; h=h^(b>>23); b=b+c;
|
||||
d=d-h; a=a^(c<<15); c=c+d;
|
||||
e=e-a; b=b^(d>>14); d=d+e;
|
||||
f=f-b; c=c^(e<<20); e=e+f;
|
||||
g=g-c; d=d^(f>>17); f=f+g;
|
||||
h=h-d; e=e^(g<<14); g=g+h;
|
||||
a = a - e;
|
||||
f = f ^ (h >> 9);
|
||||
h = h + a;
|
||||
|
||||
b = b - f;
|
||||
g = g ^ (a << 9);
|
||||
a = a + b;
|
||||
|
||||
c = c - g;
|
||||
h = h ^ (b >> 23);
|
||||
b = b + c;
|
||||
|
||||
d = d - h;
|
||||
a = a ^ (c << 15);
|
||||
c = c + d;
|
||||
|
||||
e = e - a;
|
||||
b = b ^ (d >> 14);
|
||||
d = d + e;
|
||||
|
||||
f = f - b;
|
||||
c = c ^ (e << 20);
|
||||
e = e + f;
|
||||
|
||||
g = g - c;
|
||||
d = d ^ (f >> 17);
|
||||
f = f + g;
|
||||
|
||||
h = h - d;
|
||||
e = e ^ (g << 14);
|
||||
g = g + h;
|
||||
}}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue