15
15
#![ feature( global_allocator) ]
16
16
#![ feature( allocator_api) ]
17
17
#![ cfg_attr( windows, feature( panic_unwind) ) ]
18
- #![ no_core]
19
-
20
- extern crate core;
18
+ #![ no_std]
21
19
22
20
#[ cfg( not( thumb) ) ]
23
- extern crate alloc_system;
24
- extern crate compiler_builtins;
25
- #[ cfg( windows) ]
26
- extern crate panic_unwind;
27
-
28
- #[ cfg( not( thumb) ) ]
29
- #[ global_allocator]
30
- static A : alloc_system:: System = alloc_system:: System ;
21
+ #[ link( name = "c" ) ]
22
+ extern { }
31
23
32
24
// NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
33
25
// compiler-rt provides a C/assembly implementation.
@@ -38,8 +30,6 @@ static A: alloc_system::System = alloc_system::System;
38
30
// have an additional comment: the function name is the ARM name for the intrinsic and the comment
39
31
// in the non-ARM name for the intrinsic.
40
32
mod intrinsics {
41
- use core:: num:: Float ;
42
-
43
33
// trunccdfsf2
44
34
pub fn aeabi_d2f ( x : f64 ) -> f32 {
45
35
x as f32
@@ -299,14 +289,6 @@ mod intrinsics {
299
289
a * b
300
290
}
301
291
302
- pub fn powidf2 ( a : f64 , b : i32 ) -> f64 {
303
- a. powi ( b)
304
- }
305
-
306
- pub fn powisf2 ( a : f32 , b : i32 ) -> f32 {
307
- a. powi ( b)
308
- }
309
-
310
292
pub fn umoddi3 ( a : u64 , b : u64 ) -> u64 {
311
293
a % b
312
294
}
@@ -398,8 +380,6 @@ fn run() {
398
380
bb ( aeabi_uldivmod ( bb ( 2 ) , bb ( 3 ) ) ) ;
399
381
bb ( moddi3 ( bb ( 2 ) , bb ( 3 ) ) ) ;
400
382
bb ( mulodi4 ( bb ( 2 ) , bb ( 3 ) ) ) ;
401
- bb ( powidf2 ( bb ( 2. ) , bb ( 3 ) ) ) ;
402
- bb ( powisf2 ( bb ( 2. ) , bb ( 3 ) ) ) ;
403
383
bb ( umoddi3 ( bb ( 2 ) , bb ( 3 ) ) ) ;
404
384
bb ( muloti4 ( bb ( 2 ) , bb ( 2 ) ) ) ;
405
385
bb ( multi3 ( bb ( 2 ) , bb ( 2 ) ) ) ;
0 commit comments