Skip to content

Commit

Permalink
asm: Make assembly code a module
Browse files Browse the repository at this point in the history
This makes the directory/module structure more consistent.
It also avoids cluttering `main.rs`.

Signed-off-by: Joe Richey <joerichey@google.com>
  • Loading branch information
josephlr authored and rbradford committed Mar 2, 2020
1 parent e9d42c5 commit efd9748
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/asm/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global_asm!(include_str!("ram64.s"));
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ mod serial;
#[macro_use]
mod common;

#[cfg(not(test))]
mod asm;
mod block;
mod bzimage;
mod efi;
Expand All @@ -43,9 +45,6 @@ mod pci;
mod pe;
mod virtio;

#[cfg(not(test))]
global_asm!(include_str!("asm/ram64.s"));

#[cfg(all(not(test), feature = "log-panic"))]
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
Expand Down

0 comments on commit efd9748

Please sign in to comment.