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
libhermit-rs
Commits
e84ca44b
Commit
e84ca44b
authored
Jan 06, 2019
by
Stefan Lankes
Browse files
avoiding compiler problems when building a kernel with debug symbols
parent
aad17276
Changes
2
Hide whitespace changes
Inline
Side-by-side
librs/Cargo.toml
View file @
e84ca44b
...
...
@@ -34,7 +34,7 @@ memcpy = true
# The development profile, used for `cargo build`.
[profile.dev]
opt-level
=
0
# controls the `--opt-level` the compiler builds with
opt-level
=
1
# controls the `--opt-level` the compiler builds with
debug
=
true
# controls whether the compiler passes `-C debuginfo`
# a value of `true` is equivalent to `2`
rpath
=
false
# controls whether the compiler passes `-C rpath`
...
...
librs/src/arch/x86_64/kernel/switch.rs
View file @
e84ca44b
...
...
@@ -24,7 +24,7 @@
#[inline(never)]
#[naked]
pub
extern
"C"
fn
switch
(
old_stack
:
*
mut
usize
,
new_stack
:
usize
)
{
pub
extern
"C"
fn
switch
(
_
old_stack
:
*
mut
usize
,
_
new_stack
:
usize
)
{
// rdi = old_stack => the address to store the old rsp
// rsi = new_stack => stack pointer of the new task
...
...
@@ -77,7 +77,7 @@ pub extern "C" fn switch(old_stack: *mut usize, new_stack: usize) {
pop %rdx
\n\t
\
pop %rcx
\n\t
\
pop %rax
\n\t
\
popfq"
::
"r{rdi}"
(
old_stack
as
u64
),
"r{rsi}"
(
new_stack
as
u64
)
::
"volatile"
popfq"
::::
"volatile"
);
}
}
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