Skip to content

Commit 821558a

Browse files
committed
Added a few more intrinsics
1 parent ac77928 commit 821558a

File tree

6 files changed

+550
-63
lines changed

6 files changed

+550
-63
lines changed

cilly/src/dotnet_type.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ pub enum DotnetTypeRef {
1717
},
1818
}
1919
impl DotnetTypeRef {
20+
#[must_use]
21+
pub fn bit_operations() -> Self {
22+
DotnetTypeRef::new("System.Runtime".into(), "System.Numerics.BitOperations")
23+
.with_valuetype(false)
24+
}
2025
#[must_use]
2126
pub fn marshal() -> Self {
2227
Self::new(
@@ -54,6 +59,14 @@ impl DotnetTypeRef {
5459
Self::new(Some("System.Runtime"), "System.Single").with_valuetype(true)
5560
}
5661
#[must_use]
62+
pub fn byte() -> Self {
63+
Self::new(Some("System.Runtime"), "System.Byte")
64+
}
65+
#[must_use]
66+
pub fn sbyte() -> Self {
67+
Self::new(Some("System.Runtime"), "System.SByte")
68+
}
69+
#[must_use]
5770
pub fn double() -> Self {
5871
Self::new(Some("System.Runtime"), "System.Double").with_valuetype(true)
5972
}

src/compile_test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ run_test! {arthm,greater_than,stable}
680680
run_test! {arthm,max,stable}
681681
run_test! {arthm,mul,stable}
682682
run_test! {arthm,not,stable}
683+
run_test! {arthm,num_test,stable}
683684
run_test! {arthm,shift,stable}
684685
run_test! {arthm,sub,stable}
685686
run_test! {arthm,xor,stable}
@@ -697,6 +698,7 @@ run_test! {intrinsics,arith_offset,stable}
697698
run_test! {intrinsics,arithmetic_misc,stable}
698699
run_test! {intrinsics,assert,stable}
699700
run_test! {intrinsics,atomics,stable}
701+
700702
run_test! {intrinsics,bswap,stable}
701703
run_test! {intrinsics,caller_location,stable}
702704
run_test! {intrinsics,catch,stable}

0 commit comments

Comments
 (0)