]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/thumbv5te_none_eabi.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / thumbv5te_none_eabi.rs
CommitLineData
2b03887a
FG
1//! Targets the ARMv5TE, with code as `t32` code by default.
2
3use crate::spec::{cvs, FramePointer, Target, TargetOptions};
4
5pub fn target() -> Target {
6 Target {
7 llvm_target: "thumbv5te-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}