WIP: Userspace console
This commit is contained in:
parent
5757f3436e
commit
61eb0d1ca8
1 changed files with 148 additions and 19 deletions
|
|
@ -1,3 +1,16 @@
|
|||
#[cfg(target_arch = "x86_64")]
|
||||
#[allow(unused_assignments)]
|
||||
#[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"
|
||||
: "intel", "volatile");
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[allow(unused_assignments)]
|
||||
#[inline(always)]
|
||||
|
|
@ -15,7 +28,7 @@ pub unsafe fn fast_copy64(dst: *mut u64, src: *const u64, len: usize) {
|
|||
#[allow(unused_assignments)]
|
||||
#[inline(always)]
|
||||
#[cold]
|
||||
pub unsafe fn fast_set(dst: *mut u32, src: u32, len: usize) {
|
||||
pub unsafe fn fast_set32(dst: *mut u32, src: u32, len: usize) {
|
||||
asm!("cld
|
||||
rep stosd"
|
||||
:
|
||||
|
|
|
|||
Loading…
Reference in a new issue