Enable the `intrinsics` program on thumb

This commit is contained in:
Alex Crichton 2017-06-25 09:25:54 -07:00
parent afe5c717a9
commit 0ebbcaede4
3 changed files with 14 additions and 14 deletions

View File

@ -115,19 +115,9 @@ done
rm -f $path rm -f $path
# Verification of the `intrinsics` program doesn't work on thumb targets right
# now.
case $1 in
thumb*)
exit 0
;;
*)
;;
esac
# Verify that we haven't drop any intrinsic/symbol # Verify that we haven't drop any intrinsic/symbol
RUSTFLAGS="-C debug-assertions=no" \ RUSTFLAGS="-C debug-assertions=no" \
$cargo build --features "$INTRINSICS_FEATURES" --target $1 --example intrinsics $cargo build --features "$INTRINSICS_FEATURES" --target $1 --example intrinsics -v
# Verify that there are no undefined symbols to `panic` within our # Verify that there are no undefined symbols to `panic` within our
# implementations # implementations

View File

@ -12,13 +12,14 @@
#![feature(core_float)] #![feature(core_float)]
#![feature(lang_items)] #![feature(lang_items)]
#![feature(start)] #![feature(start)]
#![feature(panic_unwind)]
#![feature(i128_type)] #![feature(i128_type)]
#![cfg_attr(windows, feature(panic_unwind))]
#![no_std] #![no_std]
#[cfg(not(thumb))] #[cfg(not(thumb))]
extern crate alloc_system; extern crate alloc_system;
extern crate compiler_builtins; extern crate compiler_builtins;
#[cfg(windows)]
extern crate panic_unwind; extern crate panic_unwind;
// NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even // NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
@ -444,7 +445,16 @@ pub fn __aeabi_unwind_cpp_pr0() {}
#[no_mangle] #[no_mangle]
pub fn __aeabi_unwind_cpp_pr1() {} pub fn __aeabi_unwind_cpp_pr1() {}
#[cfg(not(test))] #[cfg(not(windows))]
#[allow(non_snake_case)]
#[no_mangle]
pub fn _Unwind_Resume() {}
#[cfg(not(windows))]
#[lang = "eh_personality"]
#[no_mangle]
pub extern "C" fn eh_personality() {}
#[lang = "panic_fmt"] #[lang = "panic_fmt"]
#[no_mangle] #[no_mangle]
#[allow(private_no_mangle_fns)] #[allow(private_no_mangle_fns)]

View File

@ -37,7 +37,7 @@ pub unsafe fn __aeabi_uldivmod() {
#[cfg_attr(not(feature = "mangled-names"), no_mangle)] #[cfg_attr(not(feature = "mangled-names"), no_mangle)]
pub unsafe fn __aeabi_idivmod() { pub unsafe fn __aeabi_idivmod() {
asm!("push {r0, r1, r4, lr} asm!("push {r0, r1, r4, lr}
bl __divsi3 bl __aeabi_idiv
pop {r1, r2} pop {r1, r2}
muls r2, r2, r0 muls r2, r2, r0
subs r1, r1, r2 subs r1, r1, r2