Skip to content

Commit 8b2f5da

Browse files
committed
Add some missing functions to examples/intrinsics
1 parent 2ad1a15 commit 8b2f5da

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

examples/intrinsics.rs

+20
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ mod intrinsics {
6868
x as i64
6969
}
7070

71+
pub fn fixsfti(x: f32) -> i128 {
72+
x as i128
73+
}
74+
7175
// fixunssfsi
7276
pub fn aeabi_f2uiz(x: f32) -> u32 {
7377
x as u32
@@ -78,6 +82,10 @@ mod intrinsics {
7882
x as u64
7983
}
8084

85+
pub fn fixunssfti(x: f32) -> u128 {
86+
x as u128
87+
}
88+
8189
// addsf3
8290
pub fn aeabi_fadd(a: f32, b: f32) -> f32 {
8391
a + b
@@ -130,6 +138,10 @@ mod intrinsics {
130138
x as i64
131139
}
132140

141+
pub fn fixdfti(x: f64) -> i128 {
142+
x as i128
143+
}
144+
133145
// fixunsdfsi
134146
pub fn aeabi_d2uiz(x: f64) -> u32 {
135147
x as u32
@@ -140,6 +152,10 @@ mod intrinsics {
140152
x as u64
141153
}
142154

155+
pub fn fixunsdfti(x: f64) -> u128 {
156+
x as u128
157+
}
158+
143159
// adddf3
144160
pub fn aeabi_dadd(a: f64, b: f64) -> f64 {
145161
a + b
@@ -431,12 +447,16 @@ fn run() {
431447
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
432448
bb(extendhftf(bb(2.)));
433449
bb(extendsftf(bb(2.)));
450+
bb(fixdfti(bb(2.)));
451+
bb(fixsfti(bb(2.)));
434452
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
435453
bb(fixtfdi(bb(2.)));
436454
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
437455
bb(fixtfsi(bb(2.)));
438456
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
439457
bb(fixtfti(bb(2.)));
458+
bb(fixunsdfti(bb(2.)));
459+
bb(fixunssfti(bb(2.)));
440460
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
441461
bb(fixunstfdi(bb(2.)));
442462
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]

0 commit comments

Comments
 (0)