feat: Stabilise asm/global_asm

Requires rust 1.59.0 or later.
This commit is contained in:
Berkus Decker 2021-12-20 21:19:26 +02:00
parent 5e1bbf9758
commit 90389705a7
6 changed files with 9 additions and 11 deletions

8
Cargo.lock generated
View File

@ -22,9 +22,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cortex-a"
version = "6.1.0"
version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "509fc35485a2b4ddbacabe0bf2212cdfff88da93658608e5cc651afcb75b7733"
checksum = "b27f5d071b671f9799dfdf0c0afcec11de65195383d36e186639c83b00705e4f"
dependencies = [
"tock-registers",
]
@ -55,9 +55,9 @@ dependencies = [
[[package]]
name = "qemu-exit"
version = "2.0.1"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "220eb94f40665452ab6114bf8a8d86aa1fd41c6dbfaa4ab71b5912c8adb80389"
checksum = "0e0fa04276d522a40ed717bf874183a3b2a8bbb3fb4c646b03a7eb874ce5d543"
[[package]]
name = "quote"

View File

@ -25,8 +25,8 @@ qemu = ["qemu-exit"]
[dependencies]
r0 = "1.0"
qemu-exit = { version = "2.0", optional = true }
cortex-a = "6.1"
qemu-exit = { version = "3.0", optional = true }
cortex-a = "7.0"
tock-registers = "0.7"
ux = { version = "0.1.3", default-features = false }
usize_conversions = "0.2.0"

View File

@ -66,7 +66,7 @@ unsafe fn reset() -> ! {
// #[inline]
// fn enable_armv6_unaligned_access() {
// unsafe {
// asm!(
// core::arch::asm!(
// "mrc p15, 0, {u}, c1, c0, 0",
// "or {u}, {u}, {CR_U}",
// "mcr p15, 0, {u}, c1, c0, 0",

View File

@ -62,7 +62,7 @@ use {
},
};
global_asm!(include_str!("vectors.S"));
core::arch::global_asm!(include_str!("vectors.S"));
/// Errors possibly returned from the traps module.
#[derive(Debug, Snafu)]

View File

@ -9,8 +9,6 @@
#![no_std]
#![no_main]
#![feature(asm)]
#![feature(global_asm)]
#![feature(decl_macro)]
#![feature(allocator_api)]
#![feature(ptr_internals)]

View File

@ -27,7 +27,7 @@ pub mod semihosting {
// SAFETY: text must be \0-terminated!
let cmd = 0x04;
unsafe {
asm!(
core::arch::asm!(
"hlt #0xF000"
, in("w0") cmd
, in("x1") text.as_ptr() as u64