Skip to content

Commit

Permalink
Using asm and global_asm from core::arch module.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Liegey committed Dec 28, 2021
1 parent 7471c00 commit 2e25153
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/bios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#[allow(unused)]
use crate::prelude::*;

use core::arch::asm;

/// (`swi 0x00`) Performs a "soft reset" of the device.
///
/// Loads `r14` based on the `u8` value at `0x0300_7FFA`:
Expand Down
1 change: 1 addition & 0 deletions src/mmio_addresses/mode3.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::prelude::Color;

use core::arch::asm;
use voladdress::*;

pub const WIDTH: usize = 240;
Expand Down
3 changes: 2 additions & 1 deletion src/save/asm_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
//! WRAM. Both flash media and battery-backed SRAM require reads to be
//! performed via code in WRAM and cannot be accessed by DMA.

#![cfg_attr(not(target_arch = "arm"), allow(unused_variables, non_snake_case))]
use core::arch::global_asm;

#[cfg_attr(not(target_arch = "arm"), allow(unused_variables, non_snake_case))]
#[cfg(target_arch = "arm")]
global_asm!(include_str!("asm_routines.s"));

Expand Down
2 changes: 2 additions & 0 deletions src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

use crate::prelude::*;

use core::arch::asm;

mod locks;
mod statics;

Expand Down
1 change: 1 addition & 0 deletions src/sync/statics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use crate::sync::with_irqs_disabled;
use core::{
arch::asm,
cell::UnsafeCell,
mem::{align_of, size_of, MaybeUninit},
ptr,
Expand Down

0 comments on commit 2e25153

Please sign in to comment.