Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
HermitCore
rusty-loader
Commits
c73345d9
Commit
c73345d9
authored
Apr 26, 2020
by
Stefan Lankes
Browse files
use llvm_asm! instead of asm! to compile on nightly
parent
507f4f59
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/arch/x86_64/mod.rs
View file @
c73345d9
...
...
@@ -199,5 +199,5 @@ pub unsafe fn boot_kernel(
"Jumping to HermitCore Application Entry Point at {:#X}"
,
entry_point
);
asm!
(
"jmp *$0"
::
"r"
(
entry_point
),
"{rdi}"
(
&
BOOT_INFO
as
*
const
_
as
usize
)
:
"memory"
:
"volatile"
);
llvm_
asm!
(
"jmp *$0"
::
"r"
(
entry_point
),
"{rdi}"
(
&
BOOT_INFO
as
*
const
_
as
usize
)
:
"memory"
:
"volatile"
);
}
src/arch/x86_64/paging.rs
View file @
c73345d9
...
...
@@ -157,7 +157,7 @@ impl<S: PageSize> Page<S> {
/// Flushes this page from the TLB of this CPU.
fn
flush_from_tlb
(
&
self
)
{
unsafe
{
asm!
(
"invlpg ($0)"
::
"r"
(
self
.virtual_address
)
:
"memory"
:
"volatile"
);
llvm_
asm!
(
"invlpg ($0)"
::
"r"
(
self
.virtual_address
)
:
"memory"
:
"volatile"
);
}
}
...
...
src/arch/x86_64/processor.rs
View file @
c73345d9
...
...
@@ -8,6 +8,6 @@
/// The halt function stops the processor until the next interrupt arrives
pub
fn
halt
()
{
unsafe
{
asm!
(
"hlt"
::::
"volatile"
);
llvm_
asm!
(
"hlt"
::::
"volatile"
);
}
}
src/lib.rs
View file @
c73345d9
...
...
@@ -5,9 +5,9 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#![feature(asm)]
#![feature(const_fn)]
#![feature(lang_items)]
#![feature(llvm_asm)]
#![feature(panic_info_message)]
#![feature(specialization)]
#![feature(naked_functions)]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment