Skip to content

Commit

Permalink
Remove step_by feature
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed May 6, 2016
1 parent b41005b commit 9a9bb74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/rustup-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![feature(core_intrinsics)] // For type_name().
#![feature(fundamental)]
#![feature(step_by)]
#![recursion_limit = "1024"] // for error_chain!

extern crate hyper;
Expand Down
10 changes: 8 additions & 2 deletions src/rustup-utils/src/sha2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ impl Engine256State {

// Putting the message schedule inside the same loop as the round calculations allows for
// the compiler to generate better code.
for t in (0..48).step_by(8) {
let mut t = 0;
while t < 48 {
schedule_round!(t + 16);
schedule_round!(t + 17);
schedule_round!(t + 18);
Expand All @@ -379,9 +380,12 @@ impl Engine256State {
sha2_round!(d, e, f, g, h, a, b, c, K32, t + 5);
sha2_round!(c, d, e, f, g, h, a, b, K32, t + 6);
sha2_round!(b, c, d, e, f, g, h, a, K32, t + 7);

t += 8;
}

for t in (48..64).step_by(8) {
let mut t = 48;
while t < 64 {
sha2_round!(a, b, c, d, e, f, g, h, K32, t);
sha2_round!(h, a, b, c, d, e, f, g, K32, t + 1);
sha2_round!(g, h, a, b, c, d, e, f, K32, t + 2);
Expand All @@ -390,6 +394,8 @@ impl Engine256State {
sha2_round!(d, e, f, g, h, a, b, c, K32, t + 5);
sha2_round!(c, d, e, f, g, h, a, b, K32, t + 6);
sha2_round!(b, c, d, e, f, g, h, a, K32, t + 7);

t += 8;
}

self.h0 = self.h0.wrapping_add(a);
Expand Down

0 comments on commit 9a9bb74

Please sign in to comment.