Skip to content

Commit

Permalink
Fix rush build
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonm authored and kwindla committed Jul 3, 2022
1 parent c3941bf commit 88c5010
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rush/src/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ unsafe fn checksum(data: &[u8], length: usize, initial: u16) -> u16 {
let ptr = data.as_ptr();
let size = length;
let mut acc = initial as u64;
asm!("
core::arch::asm!("
# Accumulative sum.
xchg {acc:l}, {acc:h} # Swap to convert to host-bytes order.
1:
Expand Down Expand Up @@ -148,7 +148,7 @@ unsafe fn checksum(data: &[u8], length: usize, initial: u16) -> u16 {
let size = length;
let mut acc = initial as u64;
// Accumulative sum
asm!("
core::arch::asm!("
ands {mod32}, {size}, ~31
rev16 {acc:w}, {acc:w} // Swap initial to convert to host-bytes order.
b.eq 2f // Skip 32 bytes at once block, carry flag cleared (ands)
Expand Down
1 change: 0 additions & 1 deletion rush/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![allow(dead_code)]
#![feature(test)]
#![feature(asm)]

mod memory;
mod packet;
Expand Down

0 comments on commit 88c5010

Please sign in to comment.