Macro check_misalign32

Source
macro_rules! check_misalign32 {
    ($ptr:expr) => { ... };
}
Expand description

Checks that an address is aligned to a 32 byte bound.

If the result is non-zero, that’s how many bytes past the most recent 32 byte bound you are.

#[macro_use]
extern crate retro_pixel;

fn main() {
  for x in 0 .. 100 {
    assert_eq!(check_misalign32!(x), x % 32);
  }
}