rustc_target/spec/targets/thumbv5te_none_eabi.rs
1//! Targets the ARMv5TE, with code as `t32` code by default.
2
3use crate::spec::{FloatAbi, FramePointer, Target, TargetOptions, base, cvs};
4
5pub(crate) fn target() -> Target {
6 Target {
7 llvm_target: "thumbv5te-none-eabi".into(),
8 metadata: crate::spec::TargetMetadata {
9 description: Some("Thumb-mode Bare ARMv5TE".into()),
10 tier: Some(3),
11 host_tools: Some(false),
12 std: Some(false),
13 },
14 pointer_width: 32,
15 arch: "arm".into(),
16 /* Data layout args are '-' separated:
17 * little endian
18 * stack is 64-bit aligned (EABI)
19 * pointers are 32-bit
20 * i64 must be 64-bit aligned (EABI)
21 * mangle names with ELF style
22 * native integers are 32-bit
23 * All other elements are default
24 */
25 data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
26
27 options: TargetOptions {
28 abi: "eabi".into(),
29 llvm_floatabi: Some(FloatAbi::Soft),
30 // extra args passed to the external assembler (assuming `arm-none-eabi-as`):
31 // * activate t32/a32 interworking
32 // * use arch ARMv5TE
33 // * use little-endian
34 asm_args: cvs!["-mthumb-interwork", "-march=armv5te", "-mlittle-endian",],
35 // minimum extra features, these cannot be disabled via -C
36 // Also force-enable 32-bit atomics, which allows the use of atomic load/store only.
37 // The resulting atomics are ABI incompatible with atomics backed by libatomic.
38 features: "+soft-float,+strict-align,+atomics-32".into(),
39 frame_pointer: FramePointer::MayOmit,
40 main_needs_argc_argv: false,
41 // don't have atomic compare-and-swap
42 atomic_cas: false,
43 has_thumb_interworking: true,
44
45 ..base::thumb::opts()
46 },
47 }
48}