Skip to content

Drop AT&T syntax from inline asm #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ matrix:

# MSRV
- env: TARGET=thumbv6m-none-eabi
rust: 1.31.0
rust: 1.36.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv7m-none-eabi
rust: 1.31.0
rust: 1.36.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv7em-none-eabi
rust: 1.31.0
rust: 1.36.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

# MSRV
- env: TARGET=thumbv7em-none-eabihf
rust: 1.31.0
rust: 1.36.0
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)

- env: TARGET=thumbv6m-none-eabi
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- MSRV bumped to 1.36.0 due to `aligned` dependency.

### Fixed

- Drop AT&T syntax from inline asm, which was causing miscompilations with newer versions of the compiler.

## [v0.6.3] - 2020-07-20

### Added
Expand Down
3 changes: 1 addition & 2 deletions src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn delay(_n: u32) {
() => unsafe {
llvm_asm!("1:
nop
subs $0, $$1
subs $0, #1
bne.n 1b"
: "+r"(_n / 4 + 1)
:
Expand Down Expand Up @@ -81,7 +81,6 @@ pub fn nop() {
}
}


/// Generate an Undefined Instruction exception.
///
/// Can be used as a stable alternative to `core::intrinsics::abort`.
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@
//!
//! # Minimum Supported Rust Version (MSRV)
//!
//! This crate is guaranteed to compile on stable Rust 1.31 and up. It *might*
//! This crate is guaranteed to compile on stable Rust 1.36 and up. It *might*
//! compile with older versions but that may change in any new patch release.

#![cfg_attr(feature = "inline-asm", feature(llvm_asm))]
#![deny(missing_docs)]
#![no_std]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]

// This makes clippy warn about public functions which are not #[inline].
//
// Almost all functions in this crate result in trivial or even no assembly.
Expand Down