Skip to content

Commit ce915d2

Browse files
authored
Try #8:
2 parents 0822390 + dc58992 commit ce915d2

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@ language: rust
22

33
matrix:
44
include:
5+
# MSRV
56
- env: TARGET=x86_64-unknown-linux-gnu
67
rust: 1.31.0
78
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
89

10+
# MSRV
911
- env: TARGET=armv7r-none-eabi
1012
rust: 1.31.0
1113
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
1214

15+
# MSRV
1316
- env: TARGET=armv7r-none-eabihf
1417
rust: 1.31.0
1518
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
1619

20+
# MSRV
1721
- env: TARGET=armebv7r-none-eabi
1822
rust: 1.31.0
1923
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
2024

25+
# MSRV
2126
- env: TARGET=armebv7r-none-eabihf
2227
rust: 1.31.0
2328
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
This project is developed and maintained by the [Cortex-R team][team].
88

9+
# Minimum Supported Rust Version (MSRV)
10+
11+
This crate is guaranteed to compile on stable Rust 1.31.0 and up. It *might*
12+
compile with older versions but that may change in any new patch release.
13+
914
## License
1015

1116
The `arm-dcc` crate is distributed under the terms of both the MIT license and

panic/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,13 @@
5757
//!
5858
//! ## `inline-asm`
5959
//!
60-
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`asm!`) and
60+
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`llvm_asm!`) and
6161
//! compiling this crate requires nightly. Note that this feature requires that the compilation
6262
//! target is one of the 4 ARMv7 Cortex-R targets.
6363
//!
6464
//! When this feature is disabled `dcc::write` is implemented using FFI calls into an external
6565
//! assembly file and compiling this crate works on stable and beta.
6666
67-
6867
#![deny(missing_docs)]
6968
#![deny(warnings)]
7069
#![no_std]

src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,15 @@
6565
//!
6666
//! ## `inline-asm`
6767
//!
68-
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`asm!`) and
68+
//! When this feature is enabled `dcc::write` is implemented using inline assembly (`llvm_asm!`) and
6969
//! compiling this crate requires nightly. Note that this feature requires that the compilation
7070
//! target is one of the 4 ARMv7 Cortex-R targets.
7171
//!
7272
//! When this feature is disabled `dcc::write` is implemented using FFI calls into an external
7373
//! assembly file and compiling this crate works on stable and beta.
7474
75-
#![cfg_attr(feature = "inline-asm", feature(asm))]
75+
#![cfg_attr(feature = "inline-asm", feature(llvm_asm))]
7676
#![deny(missing_docs)]
77-
#![deny(warnings)]
7877
#![no_std]
7978

8079
use core::fmt;
@@ -135,12 +134,12 @@ pub fn write(word: u32) {
135134
let mut r: u32;
136135
loop {
137136
// busy wait until we can send data
138-
asm!("MRC p14, 0, $0, c0, c1, 0" : "=r"(r) : : : "volatile");
137+
llvm_asm!("MRC p14, 0, $0, c0, c1, 0" : "=r"(r) : : : "volatile");
139138
if r & W == 0 {
140139
break;
141140
}
142141
}
143-
asm!("MCR p14, 0, $0, c0, c5, 0" : : "r"(word) : : "volatile");
142+
llvm_asm!("MCR p14, 0, $0, c0, c5, 0" : : "r"(word) : : "volatile");
144143
}
145144
}
146145
#[cfg(all(target_arch = "arm", not(feature = "nop"), not(feature = "inline-asm")))]

0 commit comments

Comments
 (0)