pub struct InstructionBuilder {
pub instructions: Vec<BinaryInstruction>,
pub comments: Vec<String>,
}Fields§
§instructions: Vec<BinaryInstruction>§comments: Vec<String>Implementations§
Source§impl InstructionBuilder
impl InstructionBuilder
pub const fn new() -> Self
pub fn position(&self) -> InstructionPosition
pub fn add_conditional_jump_placeholder( &mut self, condition_addr: FrameMemoryAddress, comment: &str, ) -> PatchPosition
pub fn add_call_placeholder(&mut self, comment: &str) -> PatchPosition
pub fn add_jump_placeholder(&mut self, comment: &str) -> PatchPosition
pub fn add_enter(&mut self, size: FrameMemorySize, comment: &str)
pub fn add_mov( &mut self, target: FrameMemoryAddress, source: FrameMemoryAddress, size: MemorySize, comment: &str, )
pub fn add_ret(&mut self, comment: &str)
pub fn add_hlt(&mut self, comment: &str)
pub fn add_call(&mut self, function_ip: &InstructionPosition, comment: &str)
pub fn add_alloc( &mut self, target: FrameMemoryAddress, size: MemorySize, comment: &str, )
Sourcepub fn patch_jump(
&mut self,
patch_position: PatchPosition,
target_position: &InstructionPosition,
)
pub fn patch_jump( &mut self, patch_position: PatchPosition, target_position: &InstructionPosition, )
§Panics
pub fn patch_jump_here(&mut self, jump_position: PatchPosition)
Sourcepub fn patch_call(
&mut self,
patch_position: PatchPosition,
ip: &InstructionPosition,
)
pub fn patch_call( &mut self, patch_position: PatchPosition, ip: &InstructionPosition, )
§Panics
pub fn add_jmp(&mut self, ip: InstructionPosition, comment: &str)
pub fn add_ld32( &mut self, dst_offset: FrameMemoryAddress, value: i32, comment: &str, )
pub fn add_ld8( &mut self, dst_offset: FrameMemoryAddress, value: u8, comment: &str, )
pub fn add_load_frame_address( &mut self, dest: FrameMemoryAddress, addr: FrameMemoryAddress, comment: &str, )
pub fn add_ld_u16(&mut self, dest: FrameMemoryAddress, data: u16, comment: &str)
pub fn add_stx( &mut self, indirect_target: FrameMemoryAddress, offset: MemoryOffset, source_address: FrameMemoryAddress, size: MemorySize, comment: &str, )
pub fn add_add_i32( &mut self, dst_offset: FrameMemoryAddress, lhs_offset: FrameMemoryAddress, rhs_offset: FrameMemoryAddress, comment: &str, )
pub fn add_jmp_if( &mut self, condition_offset: FrameMemoryAddress, jmp_target: &InstructionPosition, comment: &str, )
pub fn add_jmp_if_not( &mut self, condition_offset: MemoryAddress, jmp_target: InstructionPosition, comment: &str, )
pub fn add_lt_i32( &mut self, dst_offset: FrameMemoryAddress, lhs_offset: FrameMemoryAddress, rhs_offset: FrameMemoryAddress, comment: &str, )
pub fn add_lt_u16( &mut self, dest: FrameMemoryAddress, a: FrameMemoryAddress, b: FrameMemoryAddress, comment: &str, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InstructionBuilder
impl RefUnwindSafe for InstructionBuilder
impl Send for InstructionBuilder
impl Sync for InstructionBuilder
impl Unpin for InstructionBuilder
impl UnwindSafe for InstructionBuilder
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