Struct moa_m68k::execute::M68kCycleExecutor

source ·
pub struct M68kCycleExecutor<'a, Bus, Instant>
where Bus: BusAccess<M68kAddress, Instant = Instant>,
{ pub state: &'a mut M68kState, pub bus: Bus, pub debugger: &'a mut M68kDebugger, pub cycle: M68kCycle<Instant>, }

Fields§

§state: &'a mut M68kState§bus: Bus§debugger: &'a mut M68kDebugger§cycle: M68kCycle<Instant>

Implementations§

source§

impl<'a, Bus, BusError, Instant> M68kCycleExecutor<'a, Bus, Instant>
where Bus: BusAccess<M68kAddress, Instant = Instant, Error = BusError>, Instant: Copy,

source

pub fn check_breakpoints(&mut self) -> Result<(), M68kError<BusError>>

source§

impl<'a, Bus, Instant> M68kCycleExecutor<'a, Bus, Instant>
where Bus: BusAccess<M68kAddress, Instant = Instant>, Instant: Copy,

source

pub fn end(self) -> M68kCycle<Instant>

source§

impl<'a, Bus, Instant> M68kCycleExecutor<'a, Bus, Instant>
where Bus: BusAccess<M68kAddress, Instant = Instant>, Instant: Copy,

source

pub fn step(&mut self) -> Result<(), M68kError<Bus::Error>>

source

pub fn reset_cpu(&mut self) -> Result<(), M68kError<Bus::Error>>

source

pub fn cycle_one(&mut self) -> Result<(), M68kError<Bus::Error>>

source

pub fn check_pending_interrupts( &mut self, interrupt: (bool, u8, u8) ) -> Result<(InterruptPriority, Option<u8>), M68kError<Bus::Error>>

source

pub fn exception( &mut self, number: u8, is_interrupt: bool ) -> Result<(), M68kError<Bus::Error>>

source

fn setup_group0_exception( &mut self, number: u8 ) -> Result<(), M68kError<Bus::Error>>

source

fn setup_normal_exception( &mut self, number: u8, is_interrupt: bool ) -> Result<(), M68kError<Bus::Error>>

source

pub fn process_error( &mut self, result: Result<(), M68kError<Bus::Error>> ) -> Result<(), M68kError<Bus::Error>>

source

pub fn decode_and_execute(&mut self) -> Result<(), M68kError<Bus::Error>>

source

pub fn decode_next(&mut self) -> Result<(), M68kError<Bus::Error>>

source

pub fn execute_current(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_abcd( &mut self, src: Target, dest: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_add( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_adda( &mut self, src: Target, dest: Register, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_addx( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_and( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_and_to_ccr(&mut self, value: u8) -> Result<(), M68kError<Bus::Error>>

source

fn execute_and_to_sr(&mut self, value: u16) -> Result<(), M68kError<Bus::Error>>

source

fn execute_asl( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_asr( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn set_arithmetic_shift_flags( &mut self, result: u32, count: u32, last_bit_out: bool, overflow: bool, size: Size )

source

fn execute_bcc( &mut self, cond: Condition, offset: i32 ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bra(&mut self, offset: i32) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bsr(&mut self, offset: i32) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bchg( &mut self, bitnum: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bclr( &mut self, bitnum: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bset( &mut self, bitnum: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_btst( &mut self, bitnum: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bfchg( &mut self, target: Target, offset: RegOrImmediate, width: RegOrImmediate ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bfclr( &mut self, target: Target, offset: RegOrImmediate, width: RegOrImmediate ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bfexts( &mut self, target: Target, offset: RegOrImmediate, width: RegOrImmediate, reg: Register ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bfextu( &mut self, target: Target, offset: RegOrImmediate, width: RegOrImmediate, reg: Register ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bfset( &mut self, target: Target, offset: RegOrImmediate, width: RegOrImmediate ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_bftst( &mut self, target: Target, offset: RegOrImmediate, width: RegOrImmediate ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_chk( &mut self, target: Target, reg: Register, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_clr( &mut self, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_cmp( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_cmpa( &mut self, src: Target, reg: Register, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_dbcc( &mut self, cond: Condition, reg: Register, offset: i16 ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_divw( &mut self, src: Target, dest: Register, sign: Sign ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_divl( &mut self, src: Target, dest_h: Option<Register>, dest_l: Register, sign: Sign ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_eor( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_eor_to_ccr(&mut self, value: u8) -> Result<(), M68kError<Bus::Error>>

source

fn execute_eor_to_sr(&mut self, value: u16) -> Result<(), M68kError<Bus::Error>>

source

fn execute_exg( &mut self, target1: Target, target2: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_ext( &mut self, reg: Register, from_size: Size, to_size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_illegal(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_jmp(&mut self, target: Target) -> Result<(), M68kError<Bus::Error>>

source

fn execute_jsr(&mut self, target: Target) -> Result<(), M68kError<Bus::Error>>

source

fn execute_lea( &mut self, target: Target, reg: Register ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_lsl( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_lsr( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn set_shift_flags( &mut self, result: u32, count: u32, last_bit_out: bool, size: Size )

source

fn execute_move( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_movea( &mut self, src: Target, reg: Register, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_move_from_sr( &mut self, target: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_move_to_sr( &mut self, target: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_move_to_ccr( &mut self, target: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_movec( &mut self, target: Target, control_reg: ControlRegister, dir: Direction ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_movem( &mut self, target: Target, size: Size, dir: Direction, mask: u16 ) -> Result<(), M68kError<Bus::Error>>

source

fn move_memory_to_registers( &mut self, addr: u32, size: Size, mask: u16 ) -> Result<u32, M68kError<Bus::Error>>

source

fn move_registers_to_memory( &mut self, addr: u32, size: Size, mask: u16 ) -> Result<u32, M68kError<Bus::Error>>

source

fn move_registers_to_memory_reverse( &mut self, addr: u32, size: Size, mask: u16 ) -> Result<u32, M68kError<Bus::Error>>

source

fn execute_movep( &mut self, dreg: Register, areg: Register, offset: i16, size: Size, dir: Direction ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_moveq( &mut self, data: u8, reg: Register ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_moveusp( &mut self, target: Target, dir: Direction ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_mulw( &mut self, src: Target, dest: Register, sign: Sign ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_mull( &mut self, src: Target, dest_h: Option<Register>, dest_l: Register, sign: Sign ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_nbcd(&mut self, dest: Target) -> Result<(), M68kError<Bus::Error>>

source

fn execute_neg( &mut self, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_negx( &mut self, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_not( &mut self, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_or( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_or_to_ccr(&mut self, value: u8) -> Result<(), M68kError<Bus::Error>>

source

fn execute_or_to_sr(&mut self, value: u16) -> Result<(), M68kError<Bus::Error>>

source

fn execute_pea(&mut self, target: Target) -> Result<(), M68kError<Bus::Error>>

source

fn execute_reset(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_rol( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_ror( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_roxl( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_roxr( &mut self, count: Target, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn set_rotate_flags(&mut self, result: u32, last_bit_out: bool, size: Size)

source

fn execute_rte(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_rtr(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_rts(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_scc( &mut self, cond: Condition, target: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_stop(&mut self, flags: u16) -> Result<(), M68kError<Bus::Error>>

source

fn execute_sbcd( &mut self, src: Target, dest: Target ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_sbcd_val( &mut self, src_val: u32, dest_val: u32 ) -> Result<u32, M68kError<Bus::Error>>

source

fn execute_sub( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_suba( &mut self, src: Target, dest: Register, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_subx( &mut self, src: Target, dest: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_swap(&mut self, reg: Register) -> Result<(), M68kError<Bus::Error>>

source

fn execute_tas(&mut self, target: Target) -> Result<(), M68kError<Bus::Error>>

source

fn execute_tst( &mut self, target: Target, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_trap(&mut self, number: u8) -> Result<(), M68kError<Bus::Error>>

source

fn execute_trapv(&mut self) -> Result<(), M68kError<Bus::Error>>

source

fn execute_unlk(&mut self, reg: Register) -> Result<(), M68kError<Bus::Error>>

source

fn execute_unimplemented_a( &mut self, _: u16 ) -> Result<(), M68kError<Bus::Error>>

source

fn execute_unimplemented_f( &mut self, _: u16 ) -> Result<(), M68kError<Bus::Error>>

source

pub(crate) fn get_target_value( &mut self, target: Target, size: Size, used: Used ) -> Result<u32, M68kError<Bus::Error>>

source

pub(crate) fn set_target_value( &mut self, target: Target, value: u32, size: Size, used: Used ) -> Result<(), M68kError<Bus::Error>>

source

fn get_target_address( &mut self, target: Target ) -> Result<u32, M68kError<Bus::Error>>

source

fn post_increment_areg_target( &mut self, reg: Register, size: Size, used: Used ) -> u32

source

fn pre_decrement_areg_target( &mut self, reg: Register, size: Size, used: Used ) -> u32

source

fn get_address_sized( &mut self, addr: M68kAddress, size: Size ) -> Result<u32, M68kError<Bus::Error>>

source

fn set_address_sized( &mut self, addr: M68kAddress, value: u32, size: Size ) -> Result<(), M68kError<Bus::Error>>

source

fn push_word(&mut self, value: u16) -> Result<(), M68kError<Bus::Error>>

source

fn pop_word(&mut self) -> Result<u16, M68kError<Bus::Error>>

source

fn push_long(&mut self, value: u32) -> Result<(), M68kError<Bus::Error>>

source

fn pop_long(&mut self) -> Result<u32, M68kError<Bus::Error>>

source

fn set_pc(&mut self, value: u32) -> Result<(), M68kError<Bus::Error>>

source

pub fn get_bit_field_args( &self, offset: RegOrImmediate, width: RegOrImmediate ) -> (u32, u32)

source

fn get_reg_or_immediate(&self, value: RegOrImmediate) -> u32

source

fn get_x_reg_value(&self, xreg: XRegister) -> u32

source

fn get_base_reg_value(&self, base_reg: BaseRegister) -> u32

source

fn get_index_reg_value(&self, index_reg: &Option<IndexRegister>) -> i32

source

fn get_control_reg_mut(&mut self, control_reg: ControlRegister) -> &mut u32

source

fn get_stack_pointer_mut(&mut self) -> &mut u32

source

fn get_a_reg(&self, reg: Register) -> u32

source

fn get_a_reg_mut(&mut self, reg: Register) -> &mut u32

source

fn is_supervisor(&self) -> bool

source

fn require_supervisor(&self) -> Result<(), M68kError<Bus::Error>>

source

fn set_sr(&mut self, value: u16)

source

fn get_flag(&self, flag: Flags) -> bool

source

fn set_flag(&mut self, flag: Flags, value: bool)

source

fn set_compare_flags( &mut self, value: u32, size: Size, carry: bool, overflow: bool )

source

fn set_logic_flags(&mut self, value: u32, size: Size)

source

fn set_bit_test_flags(&mut self, value: u32, bitnum: u32, size: Size) -> u32

source

fn set_bit_field_test_flags(&mut self, field: u32, msb_mask: u32)

source

fn get_current_condition(&self, cond: Condition) -> bool

Auto Trait Implementations§

§

impl<'a, Bus, Instant> Freeze for M68kCycleExecutor<'a, Bus, Instant>
where Bus: Freeze, Instant: Freeze,

§

impl<'a, Bus, Instant> RefUnwindSafe for M68kCycleExecutor<'a, Bus, Instant>
where Bus: RefUnwindSafe, Instant: RefUnwindSafe,

§

impl<'a, Bus, Instant> Send for M68kCycleExecutor<'a, Bus, Instant>
where Bus: Send, Instant: Send,

§

impl<'a, Bus, Instant> Sync for M68kCycleExecutor<'a, Bus, Instant>
where Bus: Sync, Instant: Sync,

§

impl<'a, Bus, Instant> Unpin for M68kCycleExecutor<'a, Bus, Instant>
where Bus: Unpin, Instant: Unpin,

§

impl<'a, Bus, Instant> !UnwindSafe for M68kCycleExecutor<'a, Bus, Instant>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, S> IntoAddress<T> for S
where T: FromAddress<S>,

source§

fn into_address(self) -> T

Translate the given address into an address of type T
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.