about summary refs log tree commit diff
path: root/example/mini_core.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2018-11-17 18:52:47 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2019-06-23 17:32:32 +0200
commitdb5ffdedf7ed64bde30a55e14e67efbb0f6ea538 (patch)
treef296babefb9fe51d098a77ddfa4a4765f33ca800 /example/mini_core.rs
parentd425116bdc764bdd46bf482c91aeef38fe4480e7 (diff)
downloadrust-db5ffdedf7ed64bde30a55e14e67efbb0f6ea538.tar.gz
rust-db5ffdedf7ed64bde30a55e14e67efbb0f6ea538.zip
Implement bswap intrinsic
Diffstat (limited to 'example/mini_core.rs')
-rw-r--r--example/mini_core.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs
index dd42257b194..56ab9578e78 100644
--- a/example/mini_core.rs
+++ b/example/mini_core.rs
@@ -208,6 +208,16 @@ impl PartialEq for u32 {
     }
 }
 
+
+impl PartialEq for u64 {
+    fn eq(&self, other: &u64) -> bool {
+        (*self) == (*other)
+    }
+    fn ne(&self, other: &u64) -> bool {
+        (*self) != (*other)
+    }
+}
+
 impl PartialEq for usize {
     fn eq(&self, other: &usize) -> bool {
         (*self) == (*other)
@@ -375,6 +385,7 @@ pub mod intrinsics {
         pub fn ctlz_nonzero<T>(x: T) -> T;
         pub fn needs_drop<T>() -> bool;
         pub fn bitreverse<T>(x: T) -> T;
+        pub fn bswap<T>(x: T) -> T;
     }
 }