2016-10-03 22:28:40 -05:00
|
|
|
// Targets the Cortex-M4 and Cortex-M7 processors (ARMv7E-M)
|
|
|
|
|
//
|
|
|
|
|
// This target assumes that the device doesn't have a FPU (Floating Point Unit) and lowers all the
|
|
|
|
|
// floating point operations to software routines (intrinsics).
|
|
|
|
|
//
|
|
|
|
|
// As such, this target uses the "soft" calling convention (ABI) where floating point values are
|
|
|
|
|
// passed to/from subroutines via general purpose registers (R0, R1, etc.).
|
|
|
|
|
//
|
|
|
|
|
// To opt-in to hardware accelerated floating point operations, you can use, for example,
|
|
|
|
|
// `-C target-feature=+vfp4` or `-C target-cpu=cortex-m4`.
|
|
|
|
|
|
2020-10-08 22:22:28 +03:00
|
|
|
use crate::spec::{Target, TargetOptions};
|
2016-09-15 20:46:04 -05:00
|
|
|
|
2020-10-05 15:37:55 +03:00
|
|
|
pub fn target() -> Target {
|
|
|
|
|
Target {
|
2022-03-22 11:43:05 +01:00
|
|
|
llvm_target: "thumbv7em-none-eabi".into(),
|
2020-10-14 18:08:12 +02:00
|
|
|
pointer_width: 32,
|
2022-03-22 11:43:05 +01:00
|
|
|
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
|
|
|
|
|
arch: "arm".into(),
|
2016-09-15 20:46:04 -05:00
|
|
|
|
2021-07-06 22:00:53 -07:00
|
|
|
options: TargetOptions {
|
2022-03-22 11:43:05 +01:00
|
|
|
abi: "eabi".into(),
|
2021-07-06 22:00:53 -07:00
|
|
|
max_atomic_width: Some(32),
|
|
|
|
|
..super::thumb_base::opts()
|
|
|
|
|
},
|
2020-10-05 15:37:55 +03:00
|
|
|
}
|
2016-09-15 20:46:04 -05:00
|
|
|
}
|