Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rush build #3

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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