Skip to content

Commit f54a2cc

Browse files
committed
Update cranelift and add a test for bitreverse
Fixes rust-lang#168 using bytecodealliance/cranelift#683
1 parent 14750ec commit f54a2cc

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/mini_core.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ pub mod intrinsics {
348348
pub fn uninit<T>() -> T;
349349
pub fn ctlz_nonzero<T>(x: T) -> T;
350350
pub fn needs_drop<T>() -> bool;
351+
pub fn bitreverse<T>(x: T) -> T;
351352
}
352353
}
353354

example/mini_core_hello_world.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ fn main() {
137137
puts(*world as *const str as *const u8);
138138
world as Box<SomeTrait>;
139139

140+
assert_eq!(intrinsics::bitreverse(0b10101000u8), 0b00010101u8);
141+
140142
assert_eq!(intrinsics::size_of_val(hello) as u8, 6);
141143

142144
let chars = &['C', 'h', 'a', 'r', 's'];

0 commit comments

Comments
 (0)