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
orbital
Commits
68494d9d
Verified
Commit
68494d9d
authored
Dec 13, 2018
by
Jeremy Soller
Browse files
Remove asm feature
parent
1e8c7db9
Changes
2
Hide whitespace changes
Inline
Side-by-side
orbital-core/src/image.rs
View file @
68494d9d
...
...
@@ -6,18 +6,6 @@ use std::path::Path;
use
rect
::
Rect
;
#[cfg(target_arch
=
"x86_64"
)]
#[inline(always)]
#[cold]
pub
unsafe
fn
fast_copy
(
dst
:
*
mut
u8
,
src
:
*
const
u8
,
len
:
usize
)
{
asm!
(
"cld
rep movsb"
:
:
"{rdi}"
(
dst
as
usize
),
"{rsi}"
(
src
as
usize
),
"{rcx}"
(
len
)
:
"cc"
,
"memory"
,
"rdi"
,
"rsi"
,
"rcx"
:
"intel"
,
"volatile"
);
}
pub
struct
ImageRoiRows
<
'a
>
{
rect
:
Rect
,
w
:
i32
,
...
...
@@ -112,7 +100,7 @@ impl<'a> ImageRoi<'a> {
pub
fn
blit
(
&
'a
mut
self
,
other
:
&
ImageRoi
)
{
for
(
self_row
,
other_row
)
in
self
.rows_mut
()
.zip
(
other
.rows
())
{
let
len
=
cmp
::
min
(
self_row
.len
(),
other_row
.len
());
unsafe
{
fast_copy
(
self
_row
.as_
mut_
ptr
()
as
*
mut
u8
,
other
_row
.as_ptr
()
as
*
const
u8
,
len
*
4
);
}
ptr
::
copy
(
other
_row
.as_ptr
()
,
self
_row
.as_
mut_
ptr
()
,
len
);
}
}
}
...
...
orbital-core/src/lib.rs
View file @
68494d9d
#![feature(asm)]
#[macro_use]
extern
crate
failure
;
extern
crate
event
;
extern
crate
orbclient
;
...
...
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