Skip to content

Commit

Permalink
Added a few more intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
FractalFir committed Aug 9, 2024
1 parent ac77928 commit 821558a
Show file tree
Hide file tree
Showing 6 changed files with 550 additions and 63 deletions.
13 changes: 13 additions & 0 deletions cilly/src/dotnet_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ pub enum DotnetTypeRef {
},
}
impl DotnetTypeRef {
#[must_use]
pub fn bit_operations() -> Self {
DotnetTypeRef::new("System.Runtime".into(), "System.Numerics.BitOperations")
.with_valuetype(false)
}
#[must_use]
pub fn marshal() -> Self {
Self::new(
Expand Down Expand Up @@ -54,6 +59,14 @@ impl DotnetTypeRef {
Self::new(Some("System.Runtime"), "System.Single").with_valuetype(true)
}
#[must_use]
pub fn byte() -> Self {
Self::new(Some("System.Runtime"), "System.Byte")
}
#[must_use]
pub fn sbyte() -> Self {
Self::new(Some("System.Runtime"), "System.SByte")
}
#[must_use]
pub fn double() -> Self {
Self::new(Some("System.Runtime"), "System.Double").with_valuetype(true)
}
Expand Down
2 changes: 2 additions & 0 deletions src/compile_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ run_test! {arthm,greater_than,stable}
run_test! {arthm,max,stable}
run_test! {arthm,mul,stable}
run_test! {arthm,not,stable}
run_test! {arthm,num_test,stable}
run_test! {arthm,shift,stable}
run_test! {arthm,sub,stable}
run_test! {arthm,xor,stable}
Expand All @@ -697,6 +698,7 @@ run_test! {intrinsics,arith_offset,stable}
run_test! {intrinsics,arithmetic_misc,stable}
run_test! {intrinsics,assert,stable}
run_test! {intrinsics,atomics,stable}

run_test! {intrinsics,bswap,stable}
run_test! {intrinsics,caller_location,stable}
run_test! {intrinsics,catch,stable}
Expand Down
Loading

0 comments on commit 821558a

Please sign in to comment.