From 52f9b5cadc353b615b17547734348e8546cdae84 Mon Sep 17 00:00:00 2001 From: Kenny Strawn Date: Fri, 24 Apr 2020 22:21:26 -0700 Subject: [PATCH 1/2] Fix Issue #14 Using pull request to make Phil's job a bit easier --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 921259f3..8d09f879 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,7 @@ global_asm!(include_str!("video_mode/vga_320x200.s")); global_asm!(include_str!("video_mode/vga_text_80x25.s")); unsafe fn context_switch(boot_info: VirtAddr, entry_point: VirtAddr, stack_pointer: VirtAddr) -> ! { - asm!("call $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" :: + llvm_asm!("call $1; ${:private}.spin.${:uid}: jmp ${:private}.spin.${:uid}" :: "{rsp}"(stack_pointer), "r"(entry_point), "{rdi}"(boot_info) :: "intel"); ::core::hint::unreachable_unchecked() } @@ -89,7 +89,7 @@ extern "C" { #[no_mangle] pub unsafe extern "C" fn stage_4() -> ! { // Set stack segment - asm!("mov bx, 0x0 + llvm_asm!("mov bx, 0x0 mov ss, bx" ::: "bx" : "intel"); let kernel_start = 0x400000; From b059eed46d2592c0fc8a896f3a7e06c1ffaaa311 Mon Sep 17 00:00:00 2001 From: Kenny Strawn Date: Fri, 24 Apr 2020 22:29:35 -0700 Subject: [PATCH 2/2] Fix Issue #107 (re-do) Forgot to update feature gate to match macro change --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8d09f879..ce7bcc50 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ #![feature(lang_items)] #![feature(global_asm)] #![feature(step_trait)] -#![feature(asm)] +#![feature(llvm_asm)] #![feature(nll)] #![feature(const_fn)] #![no_std]