1
- use core:: { intrinsics, ptr} ;
2
-
3
- use mem;
1
+ use core:: intrinsics;
4
2
5
3
// NOTE This function and the ones below are implemented using assembly because they using a custom
6
4
// calling convention which can't be implemented using a normal Rust function
@@ -65,13 +63,15 @@ pub unsafe fn __aeabi_ldivmod() {
65
63
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
66
64
#[ cfg_attr( thumb, linkage = "weak" ) ]
67
65
pub unsafe extern "aapcs" fn __aeabi_memcpy ( dest : * mut u8 , src : * const u8 , n : usize ) {
68
- mem:: memcpy ( dest, src, n) ;
66
+ :: mem:: memcpy ( dest, src, n) ;
69
67
}
70
68
71
69
#[ cfg( not( target_os = "ios" ) ) ]
72
70
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
73
71
#[ cfg_attr( thumb, linkage = "weak" ) ]
74
72
pub unsafe extern "aapcs" fn __aeabi_memcpy4 ( dest : * mut u8 , src : * const u8 , mut n : usize ) {
73
+ use core:: ptr;
74
+
75
75
let mut dest = dest as * mut u32 ;
76
76
let mut src = src as * mut u32 ;
77
77
@@ -96,7 +96,7 @@ pub unsafe extern "aapcs" fn __aeabi_memcpy8(dest: *mut u8, src: *const u8, n: u
96
96
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
97
97
#[ cfg_attr( thumb, linkage = "weak" ) ]
98
98
pub unsafe extern "aapcs" fn __aeabi_memmove ( dest : * mut u8 , src : * const u8 , n : usize ) {
99
- mem:: memmove ( dest, src, n) ;
99
+ :: mem:: memmove ( dest, src, n) ;
100
100
}
101
101
102
102
#[ cfg( not( target_os = "ios" ) ) ]
@@ -118,13 +118,15 @@ pub unsafe extern "aapcs" fn __aeabi_memmove8(dest: *mut u8, src: *const u8, n:
118
118
#[ cfg_attr( thumb, linkage = "weak" ) ]
119
119
pub unsafe extern "aapcs" fn __aeabi_memset ( dest : * mut u8 , n : usize , c : i32 ) {
120
120
// Note the different argument order
121
- mem:: memset ( dest, c, n) ;
121
+ :: mem:: memset ( dest, c, n) ;
122
122
}
123
123
124
124
#[ cfg( not( target_os = "ios" ) ) ]
125
125
#[ cfg_attr( not( feature = "mangled-names" ) , no_mangle) ]
126
126
#[ cfg_attr( thumb, linkage = "weak" ) ]
127
127
pub unsafe extern "aapcs" fn __aeabi_memset4 ( dest : * mut u8 , mut n : usize , c : i32 ) {
128
+ use core:: ptr;
129
+
128
130
let mut dest = dest as * mut u32 ;
129
131
130
132
let byte = ( c as u32 ) & 0xff ;
0 commit comments