From efd974849148919f04bc8b71e5117018dd97e92d Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Fri, 28 Feb 2020 20:18:18 -0800 Subject: [PATCH] asm: Make assembly code a module This makes the directory/module structure more consistent. It also avoids cluttering `main.rs`. Signed-off-by: Joe Richey --- src/asm/mod.rs | 1 + src/main.rs | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/asm/mod.rs diff --git a/src/asm/mod.rs b/src/asm/mod.rs new file mode 100644 index 00000000..e1b44166 --- /dev/null +++ b/src/asm/mod.rs @@ -0,0 +1 @@ +global_asm!(include_str!("ram64.s")); diff --git a/src/main.rs b/src/main.rs index 61c343ab..a9bcb9b1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,6 +31,8 @@ mod serial; #[macro_use] mod common; +#[cfg(not(test))] +mod asm; mod block; mod bzimage; mod efi; @@ -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) -> ! {