Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
syscall
Commits
a30fa69e
Verified
Commit
a30fa69e
authored
Apr 28, 2021
by
Jeremy Soller
Browse files
Use correct syscall return register on aarch64
parent
d2838350
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/arch/aarch64.rs
View file @
a30fa69e
...
...
@@ -7,11 +7,13 @@ macro_rules! syscall {
(
$
(
$name:ident
(
$a:ident
,
$
(
$b:ident
,
$
(
$c:ident
,
$
(
$d:ident
,
$
(
$e:ident
,
$
(
$f:ident
,
)
?
)
?
)
?
)
?
)
?
);)
+
)
=>
{
$
(
pub
unsafe
fn
$name
(
mut
$a
:
usize
,
$
(
mut
$b
:
usize
,
$
(
$c
:
usize
,
$
(
$d
:
usize
,
$
(
$e
:
usize
,
$
(
$f
:
usize
)
?
)
?
)
?
)
?
)
?
)
->
Result
<
usize
>
{
let
ret
:
usize
;
asm!
(
"svc 0"
,
in
(
"x8"
)
$a
,
$
(
in
out
(
"x0"
)
$b
,
in
(
"x0"
)
$b
,
$
(
in
(
"x1"
)
$c
,
$
(
...
...
@@ -25,10 +27,11 @@ macro_rules! syscall {
)
?
)
?
)
?
lateout
(
"x0"
)
ret
,
options
(
nostack
),
);
Error
::
demux
(
$a
)
Error
::
demux
(
ret
)
}
)
+
};
...
...
@@ -52,7 +55,7 @@ pub struct IntRegisters {
pub
spsr_el1
:
usize
,
pub
esr_el1
:
usize
,
pub
sp_el0
:
usize
,
// Shouldn't be used if interrupt occurred at EL1
pub
padding
:
usize
,
// To keep the struct even number aligned
pub
padding
:
usize
,
// To keep the struct even number aligned
pub
x30
:
usize
,
pub
x29
:
usize
,
pub
x28
:
usize
,
...
...
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