pub struct Cpu {
pub x: [u64; 32],
pub v: [[u32; 4]; 32],
pub z: bool,
pub mem: Vec<u8>,
}Fields§
§x: [u64; 32]§v: [[u32; 4]; 32]§z: bool§mem: Vec<u8>Implementations§
Source§impl Cpu
impl Cpu
pub fn ld32(&self, a: u64) -> u32
pub fn st32(&mut self, a: u64, v: u32)
pub fn ld64(&self, a: u64) -> u64
pub fn st64(&mut self, a: u64, v: u64)
Sourcepub fn ss(&mut self, r: usize, x: f32)
pub fn ss(&mut self, r: usize, x: f32)
Write an s register: the upper lanes are zeroed, as on AArch64.
pub fn vf(&self, r: usize) -> [f32; 4]
pub fn setvf(&mut self, r: usize, x: [f32; 4])
Sourcepub fn vop4(
&mut self,
d: usize,
n: usize,
m: usize,
f: impl Fn(f32, f32, f32) -> f32,
)
pub fn vop4( &mut self, d: usize, n: usize, m: usize, f: impl Fn(f32, f32, f32) -> f32, )
A 4-lane float op d = f(n, m, d).
Sourcepub fn vop2(
&mut self,
d: usize,
n: usize,
m: usize,
f: impl Fn(f32, f32, f32) -> f32,
)
pub fn vop2( &mut self, d: usize, n: usize, m: usize, f: impl Fn(f32, f32, f32) -> f32, )
A 2-lane float op; the upper half of the destination is zeroed.
pub fn get(&self, addr: u64, n: usize) -> Vec<f32>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Cpu
impl Freeze for Cpu
impl Move for Cpu
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnsafeUnpin for Cpu
impl UnwindSafe for Cpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more