Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
syscall
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
syscall
Commits
b12d582d
Verified
Commit
b12d582d
authored
Jan 13, 2021
by
Jeremy Soller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: aarch64
parent
ee9a9236
Pipeline
#8957
failed with stages
in 1 minute and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
src/arch/aarch64.rs
src/arch/aarch64.rs
+47
-0
No files found.
src/arch/aarch64.rs
View file @
b12d582d
use
core
::{
mem
,
slice
};
use
core
::
ops
::{
Deref
,
DerefMut
};
use
super
::
error
::{
Error
,
Result
};
pub
unsafe
fn
syscall0
(
mut
a
:
usize
)
->
Result
<
usize
>
{
...
...
@@ -60,3 +63,47 @@ pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f:
Error
::
demux
(
a
)
}
//TODO
#[derive(Copy,
Clone,
Debug,
Default)]
#[repr(C)]
pub
struct
IntRegisters
;
impl
Deref
for
IntRegisters
{
type
Target
=
[
u8
];
fn
deref
(
&
self
)
->
&
[
u8
]
{
unsafe
{
slice
::
from_raw_parts
(
self
as
*
const
IntRegisters
as
*
const
u8
,
mem
::
size_of
::
<
IntRegisters
>
())
}
}
}
impl
DerefMut
for
IntRegisters
{
fn
deref_mut
(
&
mut
self
)
->
&
mut
[
u8
]
{
unsafe
{
slice
::
from_raw_parts_mut
(
self
as
*
mut
IntRegisters
as
*
mut
u8
,
mem
::
size_of
::
<
IntRegisters
>
())
}
}
}
//TODO
#[derive(Clone,
Copy,
Debug,
Default)]
#[repr(packed)]
pub
struct
FloatRegisters
;
impl
Deref
for
FloatRegisters
{
type
Target
=
[
u8
];
fn
deref
(
&
self
)
->
&
[
u8
]
{
unsafe
{
slice
::
from_raw_parts
(
self
as
*
const
FloatRegisters
as
*
const
u8
,
mem
::
size_of
::
<
FloatRegisters
>
())
}
}
}
impl
DerefMut
for
FloatRegisters
{
fn
deref_mut
(
&
mut
self
)
->
&
mut
[
u8
]
{
unsafe
{
slice
::
from_raw_parts_mut
(
self
as
*
mut
FloatRegisters
as
*
mut
u8
,
mem
::
size_of
::
<
FloatRegisters
>
())
}
}
}
Write
Preview
Markdown
is supported
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