From 78bf5c906cbc8e7decae5cf5c4aab4e9f88ae9b2 Mon Sep 17 00:00:00 2001 From: Thales Fragoso Date: Tue, 20 Oct 2020 20:10:00 -0300 Subject: [PATCH 1/2] Drop AT&T syntax from inline asm --- src/asm.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/asm.rs b/src/asm.rs index ebd61b32..d9e54b5d 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -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) : @@ -81,7 +81,6 @@ pub fn nop() { } } - /// Generate an Undefined Instruction exception. /// /// Can be used as a stable alternative to `core::intrinsics::abort`. From dc8fee685fcd4fb5445800d2974b764ed08830c9 Mon Sep 17 00:00:00 2001 From: Thales Fragoso Date: Sun, 25 Oct 2020 22:56:01 -0300 Subject: [PATCH 2/2] Bump MSRV --- .travis.yml | 8 ++++---- CHANGELOG.md | 8 ++++++++ src/lib.rs | 3 +-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index aed4f94c..88d68cf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 65027c3a..376e6bb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/lib.rs b/src/lib.rs index 7b70f0cc..eed126b6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ //! //! # 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))] @@ -34,7 +34,6 @@ #![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.