1515#![ feature( global_allocator) ]
1616#![ feature( allocator_api) ]
1717#![ cfg_attr( windows, feature( panic_unwind) ) ]
18- #![ no_core]
19-
20- extern crate core;
18+ #![ no_std]
2119
2220#[ 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 { }
3123
3224// NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
3325// compiler-rt provides a C/assembly implementation.
@@ -38,8 +30,6 @@ static A: alloc_system::System = alloc_system::System;
3830// have an additional comment: the function name is the ARM name for the intrinsic and the comment
3931// in the non-ARM name for the intrinsic.
4032mod intrinsics {
41- use core:: num:: Float ;
42-
4333 // trunccdfsf2
4434 pub fn aeabi_d2f ( x : f64 ) -> f32 {
4535 x as f32
@@ -299,14 +289,6 @@ mod intrinsics {
299289 a * b
300290 }
301291
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-
310292 pub fn umoddi3 ( a : u64 , b : u64 ) -> u64 {
311293 a % b
312294 }
@@ -398,8 +380,6 @@ fn run() {
398380 bb ( aeabi_uldivmod ( bb ( 2 ) , bb ( 3 ) ) ) ;
399381 bb ( moddi3 ( bb ( 2 ) , bb ( 3 ) ) ) ;
400382 bb ( mulodi4 ( bb ( 2 ) , bb ( 3 ) ) ) ;
401- bb ( powidf2 ( bb ( 2. ) , bb ( 3 ) ) ) ;
402- bb ( powisf2 ( bb ( 2. ) , bb ( 3 ) ) ) ;
403383 bb ( umoddi3 ( bb ( 2 ) , bb ( 3 ) ) ) ;
404384 bb ( muloti4 ( bb ( 2 ) , bb ( 2 ) ) ) ;
405385 bb ( multi3 ( bb ( 2 ) , bb ( 2 ) ) ) ;
0 commit comments