https://github.com/rust-av/checkasm-rs
Helpers to check stand-alone assembly functions
https://github.com/rust-av/checkasm-rs
Last synced: over 1 year ago
JSON representation
Helpers to check stand-alone assembly functions
- Host: GitHub
- URL: https://github.com/rust-av/checkasm-rs
- Owner: rust-av
- License: bsd-2-clause
- Created: 2020-12-28T14:16:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-30T07:55:55.000Z (over 5 years ago)
- Last Synced: 2025-02-28T05:54:59.352Z (over 1 year ago)
- Language: Assembly
- Size: 64.5 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# checkasm helper for rust
It is a port of the [dav1d](https://code.videolan.org/videolan/dav1d) checkasm harness to rust.
## Usage
``` rust
#[cfg(test)]
mod test {
use checkasm::declare_fn;
use std::ffi::c_void;
extern fn variant_avx2(a: *mut u8, len: usize);
extern fn variant_avx512(a: *mut u8, len: usize);
declare_fn { check_variant(a: *mut u8, len: usize) };
#[test]
fn variant() {
let mut buf = vec![0u8; 128];
check_variant(variant_avx512 as *mut c_void, buf.as_mut_ptr(), buf.len());
}
}
```
## Status
- [x] builds
- [x] reports errors on stderr
- [ ] panics correctly