]> git.lizzy.rs Git - rust.git/commit
add Thumbs to the compiler
authorJorge Aparicio <japaricious@gmail.com>
Fri, 16 Sep 2016 01:46:04 +0000 (20:46 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sun, 2 Oct 2016 20:52:26 +0000 (15:52 -0500)
commit901c5f2aa4d2a473500e1daec8fd2f627ddde5d2
treea36762018c5f3220f4dec02ee43f7fcf9af6428f
parent8991ffc3031b4e787f9216caa12aa556f5ede8ed
add Thumbs to the compiler

this commit adds 4 new target definitions to the compiler for easier
cross compilation to ARM Cortex-M devices.

- `thumbv6m-none-eabi`
  - For the Cortex-M0, Cortex-M0+ and Cortex-M1
  - This architecture doesn't have hardware support (instructions) for
    atomics. Hence, the `Atomic*` structs are not available for this
    target.
- `thumbv7m-none-eabi`
  - For the Cortex-M3
- `thumbv7em-none-eabi`
  - For the FPU-less variants of the Cortex-M4 and Cortex-M7
  - On this target, all the floating point operations will be lowered
    software routines (intrinsics)
- `thumbv7em-none-eabihf`
  - For the variants of the Cortex-M4 and Cortex-M7 that do have a FPU.
  - On this target, all the floating point operations will be lowered
    to hardware instructions

No binary releases of standard crates, like `core`, are planned for
these targets because Cargo, in the future, will compile e.g. the `core`
crate on the fly as part of the `cargo build` process. In the meantime,
you'll have to compile the `core` crate yourself. [Xargo] is the easiest
way to do that as in handles the compilation of `core` automatically and
can be used just like Cargo: `xargo build --target thumbv6m-none-eabi`
is all that's needed.

[Xargo]: https://crates.io/crates/xargo
src/librustc_back/target/mod.rs
src/librustc_back/target/thumb_base.rs [new file with mode: 0644]
src/librustc_back/target/thumbv6m_none_eabi.rs [new file with mode: 0644]
src/librustc_back/target/thumbv7em_none_eabi.rs [new file with mode: 0644]
src/librustc_back/target/thumbv7em_none_eabihf.rs [new file with mode: 0644]
src/librustc_back/target/thumbv7m_none_eabi.rs [new file with mode: 0644]
src/test/run-make/target-without-atomics/Makefile [new file with mode: 0644]