pub struct Memory { /* private fields */ }
Expand description
This structure represents a memory operand.
For instance:
movq xmm3, qword ptr [rip + 823864];
|
|
Memory
|
+-----------+-----------+
| | |
Base: rip Scale: 1 Displacement: 823864
Implementations§
§impl Memory
impl Memory
pub fn scaled_register(&self) -> Reg
pub fn scaled_register(&self) -> Reg
The scaled register.
For mov rdi, qword ptr [r13 + 8*r14]
it would return Reg::R14
pub fn segment_register(&self) -> Reg
pub fn segment_register(&self) -> Reg
The segment register associated with the memory operation.
For mov eax, dword ptr gs:[0]
is would return Reg::GS
pub fn scale(&self) -> u64
pub fn scale(&self) -> u64
The scale value associated with the Memory::scaled_register
For mov rdi, qword ptr [r13 + 8*r14]
it would return 8
pub fn displacement(&self) -> i64
pub fn displacement(&self) -> i64
The displacement value
For call qword ptr [rip + 248779]
it would return 248779
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Memory
impl !Send for Memory
impl !Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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