diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-02-23 10:41:34 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-02-23 10:41:34 +0100 |
| commit | f54a2cc2e477c2b94a8dd6f337c0fdf3262e1c72 (patch) | |
| tree | 16956c82836582e0abfabd66348e4302f8afccd1 | |
| parent | 14750ece1a8cc5b6b02438b7bdd07c848d584c3b (diff) | |
| download | rust-f54a2cc2e477c2b94a8dd6f337c0fdf3262e1c72.tar.gz rust-f54a2cc2e477c2b94a8dd6f337c0fdf3262e1c72.zip | |
Update cranelift and add a test for bitreverse
Fixes #168 using CraneStation/cranelift#683
| -rw-r--r-- | Cargo.lock | 20 | ||||
| -rw-r--r-- | example/mini_core.rs | 1 | ||||
| -rw-r--r-- | example/mini_core_hello_world.rs | 2 |
3 files changed, 13 insertions, 10 deletions
diff --git a/Cargo.lock b/Cargo.lock index c76988d8cab..39c6e2b109f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,7 +114,7 @@ dependencies = [ [[package]] name = "cranelift" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-codegen 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "cranelift-frontend 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", @@ -123,7 +123,7 @@ dependencies = [ [[package]] name = "cranelift-bforest" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-entity 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", ] @@ -131,7 +131,7 @@ dependencies = [ [[package]] name = "cranelift-codegen" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-bforest 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "cranelift-codegen-meta 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", @@ -145,7 +145,7 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-entity 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", ] @@ -153,12 +153,12 @@ dependencies = [ [[package]] name = "cranelift-entity" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" [[package]] name = "cranelift-faerie" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-codegen 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "cranelift-module 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", @@ -171,7 +171,7 @@ dependencies = [ [[package]] name = "cranelift-frontend" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-codegen 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "cranelift-module" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-codegen 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "cranelift-entity 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", @@ -192,7 +192,7 @@ dependencies = [ [[package]] name = "cranelift-native" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-codegen 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "raw-cpuid 6.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -202,7 +202,7 @@ dependencies = [ [[package]] name = "cranelift-simplejit" version = "0.28.0" -source = "git+https://github.com/CraneStation/cranelift.git#f3a9226f77c54ec792356fd016c98cc5f40917db" +source = "git+https://github.com/CraneStation/cranelift.git#0d180cfc7f93c724d47ac77f0180c095768bc4fd" dependencies = [ "cranelift-codegen 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", "cranelift-module 0.28.0 (git+https://github.com/CraneStation/cranelift.git)", diff --git a/example/mini_core.rs b/example/mini_core.rs index b7277f5ee9f..19044e1fea5 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -348,6 +348,7 @@ pub mod intrinsics { pub fn uninit<T>() -> T; pub fn ctlz_nonzero<T>(x: T) -> T; pub fn needs_drop<T>() -> bool; + pub fn bitreverse<T>(x: T) -> T; } } diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 5ab7575252b..4fa08391f5a 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -137,6 +137,8 @@ fn main() { puts(*world as *const str as *const u8); world as Box<SomeTrait>; + assert_eq!(intrinsics::bitreverse(0b10101000u8), 0b00010101u8); + assert_eq!(intrinsics::size_of_val(hello) as u8, 6); let chars = &['C', 'h', 'a', 'r', 's']; |
