Skip to content

Commit f4a59dc

Browse files
committed
Import asm!() and global_asm!() for latest nightly
Since the 19th of December, these two macros are not exported from the prelude any longer, and must be imported from core::arch instead. See rust-lang/rust#87228
1 parent 9b6bb19 commit f4a59dc

File tree

8 files changed

+14
-0
lines changed

8 files changed

+14
-0
lines changed

luma_core/src/cache.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//! Contains functions for the L1, L2, Data and Instruction caches.
44
55
use crate::{mfspr, mtspr, processor};
6+
use core::arch::{asm, global_asm};
67

78
global_asm!(include_str!("../asm/cache.S"));
89

luma_core/src/integer.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Contains functions for integer instructions.
44
5+
use core::arch::asm;
6+
57
/// (`cntlzw`) PowerPC Integer Instruction
68
#[inline(always)]
79
pub fn cntlzw(value: u32) -> u32 {

luma_core/src/io.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Contains functions for basic I/O.
44
5+
use core::arch::asm;
6+
57
/// Read a 32-bit value from an address.
68
#[inline(always)]
79
pub fn read32(address: u32) -> u32 {

luma_core/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
allocator_api
1414
)]
1515

16+
use core::arch::asm;
17+
1618
extern crate alloc;
1719

1820
// Broadway Processor Utilities

luma_core/src/loadstore.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Contains functions for load and store instructions.
44
5+
use core::arch::asm;
6+
57
/// (`lhbrx`) PowerPC Load Instruction
68
#[inline(always)]
79
pub fn lhbrx(base: u32, index: u32) -> u16 {

luma_core/src/processor.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Contains functions for system instructions.
44
5+
use core::arch::asm;
6+
57
/// PowerPC NOP Instruction
68
#[inline(always)]
79
pub fn ppc_nop() {

luma_core/src/register.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! Contains functions for register instructions.
44
5+
use core::arch::asm;
6+
57
/// (`mfspr`) PowerPC Register Instruction
68
#[macro_export]
79
macro_rules! mfspr {

luma_runtime/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
alloc_error_handler
1414
)]
1515

16+
use core::arch::global_asm;
1617
use core::{alloc::Layout, panic::PanicInfo};
1718
use linked_list_allocator::LockedHeap;
1819
#[allow(unused_imports)]

0 commit comments

Comments
 (0)