1 //! Targets the ARMv5TE, with code as `t32` code by default.
3 use crate::spec::{cvs, FramePointer, Target, TargetOptions};
5 pub fn target() -> Target {
7 llvm_target: "thumbv5te-none-eabi".into(),
10 /* Data layout args are '-' separated:
12 * stack is 64-bit aligned (EABI)
14 * i64 must be 64-bit aligned (EABI)
15 * mangle names with ELF style
16 * native integers are 32-bit
17 * All other elements are default
19 data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
21 options: TargetOptions {
23 // extra args passed to the external assembler (assuming `arm-none-eabi-as`):
24 // * activate t32/a32 interworking
26 // * use little-endian
27 asm_args: cvs!["-mthumb-interwork", "-march=armv5te", "-mlittle-endian",],
28 // minimum extra features, these cannot be disabled via -C
29 // Also force-enable 32-bit atomics, which allows the use of atomic load/store only.
30 // The resulting atomics are ABI incompatible with atomics backed by libatomic.
31 features: "+soft-float,+strict-align,+atomics-32".into(),
32 frame_pointer: FramePointer::MayOmit,
33 main_needs_argc_argv: false,
34 // don't have atomic compare-and-swap
36 has_thumb_interworking: true,
38 ..super::thumb_base::opts()