|
| 1 | +// Targets the Little-endian Cortex-R52 processor (ARMv8-R) |
| 2 | + |
| 3 | +use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions}; |
| 4 | + |
| 5 | +pub fn target() -> Target { |
| 6 | + Target { |
| 7 | + llvm_target: "armv8r-none-eabihf".into(), |
| 8 | + pointer_width: 32, |
| 9 | + data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), |
| 10 | + arch: "arm".into(), |
| 11 | + |
| 12 | + options: TargetOptions { |
| 13 | + abi: "eabihf".into(), |
| 14 | + linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), |
| 15 | + linker: Some("rust-lld".into()), |
| 16 | + relocation_model: RelocModel::Static, |
| 17 | + panic_strategy: PanicStrategy::Abort, |
| 18 | + // The Cortex-R52 has two variants with respect to floating-point support: |
| 19 | + // 1. fp-armv8, SP-only, with 16 DP (32 SP) registers |
| 20 | + // 2. neon-fp-armv8, SP+DP, with 32 DP registers |
| 21 | + // Use the lesser of these two options as the default, as it will produce code |
| 22 | + // compatible with either variant. |
| 23 | + // |
| 24 | + // Reference: |
| 25 | + // Arm Cortex-R52 Processor Technical Reference Manual |
| 26 | + // - Chapter 15 Advanced SIMD and floating-point support |
| 27 | + features: "+fp-armv8,-fp64,-d32".into(), |
| 28 | + max_atomic_width: Some(64), |
| 29 | + emit_debug_gdb_scripts: false, |
| 30 | + // GCC defaults to 8 for arm-none here. |
| 31 | + c_enum_min_bits: Some(8), |
| 32 | + ..Default::default() |
| 33 | + }, |
| 34 | + } |
| 35 | +} |
0 commit comments