[−][src]Struct dynasmrt::Modifier
Allows modification of already committed assembly code. Contains an internal cursor
into the emitted assembly, initialized to the start, that can be moved around either with the
goto
function, or just by assembling new code into this Modifier
.
Implementations
impl<'a, R: Relocation> Modifier<'a, R>
[src]
pub fn goto(&mut self, offset: AssemblyOffset)
[src]
Move the modifier cursor to the selected location.
pub fn check(&self, offset: AssemblyOffset) -> Result<(), DynasmError>
[src]
Check that the modifier cursor has not moved past the specified location.
pub fn check_exact(&self, offset: AssemblyOffset) -> Result<(), DynasmError>
[src]
Check that the modifier cursor is exactly at the specified location.
Trait Implementations
impl<'a, R: Debug + Relocation> Debug for Modifier<'a, R>
[src]
impl<'a, R: Relocation> DynasmApi for Modifier<'a, R>
[src]
pub fn offset(&self) -> AssemblyOffset
[src]
pub fn push(&mut self, value: u8)
[src]
pub fn align(&mut self, alignment: usize, with: u8)
[src]
pub fn push_i8(&mut self, value: i8)
[src]
pub fn push_i16(&mut self, value: i16)
[src]
pub fn push_i32(&mut self, value: i32)
[src]
pub fn push_i64(&mut self, value: i64)
[src]
pub fn push_u16(&mut self, value: u16)
[src]
pub fn push_u32(&mut self, value: u32)
[src]
pub fn push_u64(&mut self, value: u64)
[src]
pub fn runtime_error(&self, msg: &'static str) -> !
[src]
impl<'a, R: Relocation> DynasmLabelApi for Modifier<'a, R>
[src]
type Relocation = R
The relocation info type this assembler uses.
pub fn local_label(&mut self, name: &'static str)
[src]
pub fn global_label(&mut self, name: &'static str)
[src]
pub fn dynamic_label(&mut self, id: DynamicLabel)
[src]
pub fn global_relocation(
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
[src]
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
pub fn dynamic_relocation(
&mut self,
id: DynamicLabel,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
[src]
&mut self,
id: DynamicLabel,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
pub fn forward_relocation(
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
[src]
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
pub fn backward_relocation(
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
[src]
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: R
)
pub fn bare_relocation(
&mut self,
target: usize,
field_offset: u8,
ref_offset: u8,
kind: R
)
[src]
&mut self,
target: usize,
field_offset: u8,
ref_offset: u8,
kind: R
)
pub fn forward_reloc(
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
[src]
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
pub fn backward_reloc(
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
[src]
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
pub fn global_reloc(
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
[src]
&mut self,
name: &'static str,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
pub fn dynamic_reloc(
&mut self,
id: DynamicLabel,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
[src]
&mut self,
id: DynamicLabel,
target_offset: isize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
pub fn bare_reloc(
&mut self,
target: usize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
[src]
&mut self,
target: usize,
field_offset: u8,
ref_offset: u8,
kind: <Self::Relocation as Relocation>::Encoding
)
impl<'a, 'b, R: Relocation> Extend<&'b u8> for Modifier<'a, R>
[src]
pub fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = &'b u8>,
[src]
T: IntoIterator<Item = &'b u8>,
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<'a, R: Relocation> Extend<u8> for Modifier<'a, R>
[src]
pub fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = u8>,
[src]
T: IntoIterator<Item = u8>,
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
Auto Trait Implementations
impl<'a, R> RefUnwindSafe for Modifier<'a, R> where
R: RefUnwindSafe,
[src]
R: RefUnwindSafe,
impl<'a, R> Send for Modifier<'a, R> where
R: Send,
[src]
R: Send,
impl<'a, R> Sync for Modifier<'a, R> where
R: Sync,
[src]
R: Sync,
impl<'a, R> Unpin for Modifier<'a, R>
[src]
impl<'a, R> !UnwindSafe for Modifier<'a, R>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,