@@ -189,7 +189,6 @@ use core::mem;
189
189
target_os = "linux",
190
190
test)))]
191
191
use std::mem;
192
-
193
192
use compiler_builtins::float::add::__adddf3;
194
193
195
194
fn mk_f64(x: u64) -> f64 {
@@ -829,22 +828,11 @@ fn divsi3() {
829
828
}
830
829
831
830
fn prologue ( ) -> & ' static str {
832
- r#"
833
- #[cfg(all(target_arch = "arm",
834
- not(any(target_env = "gnu", target_env = "musl")),
835
- target_os = "linux",
836
- test))]
837
- use core::mem;
838
- #[cfg(not(all(target_arch = "arm",
839
- not(any(target_env = "gnu", target_env = "musl")),
840
- target_os = "linux",
841
- test)))]
842
- use std::mem;
843
-
831
+ "
844
832
use compiler_builtins::int::sdiv::__divti3;
845
833
846
834
static TEST_CASES: &[((i128, i128), i128)] = &[
847
- "#
835
+ "
848
836
}
849
837
850
838
fn epilogue ( ) -> & ' static str {
@@ -854,7 +842,7 @@ static TEST_CASES: &[((i128, i128), i128)] = &[
854
842
#[test]
855
843
fn divti3() {
856
844
for &((a, b), c) in TEST_CASES {
857
- let c_: i128 = unsafe { mem::transmute( __divti3(a, b)) } ;
845
+ let c_ = __divti3(a, b);
858
846
assert_eq!(((a, b), c), ((a, b), c_));
859
847
}
860
848
}
@@ -1907,22 +1895,11 @@ fn modsi3() {
1907
1895
}
1908
1896
1909
1897
fn prologue ( ) -> & ' static str {
1910
- r#"
1911
- #[cfg(all(target_arch = "arm",
1912
- not(any(target_env = "gnu", target_env = "musl")),
1913
- target_os = "linux",
1914
- test))]
1915
- use core::mem;
1916
- #[cfg(not(all(target_arch = "arm",
1917
- not(any(target_env = "gnu", target_env = "musl")),
1918
- target_os = "linux",
1919
- test)))]
1920
- use std::mem;
1921
-
1898
+ "
1922
1899
use compiler_builtins::int::sdiv::__modti3;
1923
1900
1924
1901
static TEST_CASES: &[((i128, i128), i128)] = &[
1925
- "#
1902
+ "
1926
1903
}
1927
1904
1928
1905
fn epilogue ( ) -> & ' static str {
@@ -1932,7 +1909,7 @@ static TEST_CASES: &[((i128, i128), i128)] = &[
1932
1909
#[test]
1933
1910
fn modti3() {
1934
1911
for &((a, b), c) in TEST_CASES {
1935
- let c_: i128 = unsafe { mem::transmute( __modti3(a, b)) } ;
1912
+ let c_ = __modti3(a, b);
1936
1913
assert_eq!(((a, b), c), ((a, b), c_));
1937
1914
}
1938
1915
}
@@ -2936,22 +2913,11 @@ fn udivmodsi4() {
2936
2913
}
2937
2914
2938
2915
fn prologue ( ) -> & ' static str {
2939
- r#"
2940
- #[cfg(all(target_arch = "arm",
2941
- not(any(target_env = "gnu", target_env = "musl")),
2942
- target_os = "linux",
2943
- test))]
2944
- use core::mem;
2945
- #[cfg(not(all(target_arch = "arm",
2946
- not(any(target_env = "gnu", target_env = "musl")),
2947
- target_os = "linux",
2948
- test)))]
2949
- use std::mem;
2950
-
2916
+ "
2951
2917
use compiler_builtins::int::udiv::__udivmodti4;
2952
2918
2953
2919
static TEST_CASES: &[((u128, u128), (u128, u128))] = &[
2954
- "#
2920
+ "
2955
2921
}
2956
2922
2957
2923
fn epilogue ( ) -> & ' static str {
@@ -2962,7 +2928,7 @@ static TEST_CASES: &[((u128, u128), (u128, u128))] = &[
2962
2928
fn udivmodti4() {
2963
2929
for &((a, b), (c, rem)) in TEST_CASES {
2964
2930
let mut rem_ = 0;
2965
- let c_: u128 = unsafe { mem::transmute( __udivmodti4(a, b, Some(&mut rem_))) } ;
2931
+ let c_ = __udivmodti4(a, b, Some(&mut rem_));
2966
2932
assert_eq!(((a, b), (c, rem)), ((a, b), (c_, rem_)));
2967
2933
}
2968
2934
}
@@ -3070,22 +3036,11 @@ fn udivsi3() {
3070
3036
}
3071
3037
3072
3038
fn prologue ( ) -> & ' static str {
3073
- r#"
3074
- #[cfg(all(target_arch = "arm",
3075
- not(any(target_env = "gnu", target_env = "musl")),
3076
- target_os = "linux",
3077
- test))]
3078
- use core::mem;
3079
- #[cfg(not(all(target_arch = "arm",
3080
- not(any(target_env = "gnu", target_env = "musl")),
3081
- target_os = "linux",
3082
- test)))]
3083
- use std::mem;
3084
-
3039
+ "
3085
3040
use compiler_builtins::int::udiv::__udivti3;
3086
3041
3087
3042
static TEST_CASES: &[((u128, u128), u128)] = &[
3088
- "#
3043
+ "
3089
3044
}
3090
3045
3091
3046
fn epilogue ( ) -> & ' static str {
@@ -3095,7 +3050,7 @@ static TEST_CASES: &[((u128, u128), u128)] = &[
3095
3050
#[test]
3096
3051
fn udivti3() {
3097
3052
for &((a, b), c) in TEST_CASES {
3098
- let c_: u128 = unsafe { mem::transmute( __udivti3(a, b)) } ;
3053
+ let c_ = __udivti3(a, b);
3099
3054
assert_eq!(((a, b), c), ((a, b), c_));
3100
3055
}
3101
3056
}
@@ -3264,22 +3219,11 @@ fn umodsi3() {
3264
3219
}
3265
3220
3266
3221
fn prologue ( ) -> & ' static str {
3267
- r#"
3268
- #[cfg(all(target_arch = "arm",
3269
- not(any(target_env = "gnu", target_env = "musl")),
3270
- target_os = "linux",
3271
- test))]
3272
- use core::mem;
3273
- #[cfg(not(all(target_arch = "arm",
3274
- not(any(target_env = "gnu", target_env = "musl")),
3275
- target_os = "linux",
3276
- test)))]
3277
- use std::mem;
3278
-
3222
+ "
3279
3223
use compiler_builtins::int::udiv::__umodti3;
3280
3224
3281
3225
static TEST_CASES: &[((u128, u128), u128)] = &[
3282
- "#
3226
+ "
3283
3227
}
3284
3228
3285
3229
fn epilogue ( ) -> & ' static str {
@@ -3289,7 +3233,7 @@ static TEST_CASES: &[((u128, u128), u128)] = &[
3289
3233
#[test]
3290
3234
fn umodti3() {
3291
3235
for &((a, b), c) in TEST_CASES {
3292
- let c_: u128 = unsafe { mem::transmute( __umodti3(a, b)) } ;
3236
+ let c_ = __umodti3(a, b);
3293
3237
assert_eq!(((a, b), c), ((a, b), c_));
3294
3238
}
3295
3239
}
0 commit comments