Skip to content

Commit 5b80665

Browse files
Use llvm_asm! instead of deprecated asm! (#108)
1 parent f7277d8 commit 5b80665

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(lang_items)]
22
#![feature(global_asm)]
33
#![feature(step_trait)]
4-
#![feature(asm)]
4+
#![feature(llvm_asm)]
55
#![feature(nll)]
66
#![feature(const_fn)]
77
#![no_std]
@@ -43,7 +43,7 @@ global_asm!(include_str!("video_mode/vga_320x200.s"));
4343
global_asm!(include_str!("video_mode/vga_text_80x25.s"));
4444

4545
unsafe fn context_switch(boot_info: VirtAddr, entry_point: VirtAddr, stack_pointer: VirtAddr) -> ! {
46-
asm!("call $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" ::
46+
llvm_asm!("call $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" ::
4747
"{rsp}"(stack_pointer), "r"(entry_point), "{rdi}"(boot_info) :: "intel");
4848
::core::hint::unreachable_unchecked()
4949
}
@@ -89,7 +89,7 @@ extern "C" {
8989
#[no_mangle]
9090
pub unsafe extern "C" fn stage_4() -> ! {
9191
// Set stack segment
92-
asm!("mov bx, 0x0
92+
llvm_asm!("mov bx, 0x0
9393
mov ss, bx" ::: "bx" : "intel");
9494

9595
let kernel_start = 0x400000;

0 commit comments

Comments
 (0)