]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/armv5te_none_eabi.rs
Rollup merge of #102055 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / compiler / rustc_target / src / spec / armv5te_none_eabi.rs
1 //! Targets the ARMv5TE, with code as `a32` code by default.
2
3 use crate::spec::{cvs, FramePointer, Target, TargetOptions};
4
5 pub fn target() -> Target {
6     Target {
7         llvm_target: "armv5te-none-eabi".into(),
8         pointer_width: 32,
9         arch: "arm".into(),
10         /* Data layout args are '-' separated:
11          * little endian
12          * stack is 64-bit aligned (EABI)
13          * pointers are 32-bit
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
18          */
19         data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
20
21         options: TargetOptions {
22             abi: "eabi".into(),
23             // extra args passed to the external assembler (assuming `arm-none-eabi-as`):
24             // * activate t32/a32 interworking
25             // * use arch ARMv5TE
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
35             atomic_cas: false,
36             has_thumb_interworking: true,
37
38             ..super::thumb_base::opts()
39         },
40     }
41 }