fn spill_chip8_reg(&mut self, reg: u8) -> bool {
        // If the register isn't currently allocated to a host register, its value inside the
        // `ChipState` must already be correct.
        if let Some((host_reg, use_idx)) = self.reg_map[reg as usize].take() {
            debug!("spilling reg V{:01X}, allocated to {:?} with a use index of {}",
                reg, host_reg, use_idx);

            // Mark the reg as free
            self.free_host_regs.insert(host_reg);

            let offset = self.calc_offset(|state| &state.regs[reg as usize]);
            self.emit_state_store_u8(offset, host_reg);
            true
        } else {
            false
        }
    }
/// Generates spill code writing the current value of the given CHIP-8 register into the
/// `ChipState`. Then deallocates the host register assigned to it.
///
/// Returns `true` if the register was spilled successfully and `false` if the register isn't
/// allocated.
Generates spill code writing the current value of the given CHIP-8 register into the
`ChipState`. Then deallocates the host register assigned to it.

Returns `true` if the register was spilled successfully and `false` if the register isn't
allocated.
Generates spill code writing the current value of the given CHIP - 8 register into the ` ChipState ` . Then deallocates the host register assigned to it . Returns ` true ` if the register was spilled successfully and ` false ` if the register isn ' t allocated .
fn spill_chip8_reg(&mut self, reg: u8) -> bool {
        // If the register isn't currently allocated to a host register, its value inside the
        // `ChipState` must already be correct.
        if let Some((host_reg, use_idx)) = self.reg_map[reg as usize].take() {
            debug!("spilling reg V{:01X}, allocated to {:?} with a use index of {}",
                reg, host_reg, use_idx);
            // Mark the reg as free
            self.free_host_regs.insert(host_reg);
            let offset = self.calc_offset(|state| &state.regs[reg as usize]);
            self.emit_state_store_u8(offset, host_reg);
            true
        } else {
            false
        }
    }
fn spill_chip8_reg ( & mut self , reg : u8 ) -> bool { // If the register isn't currently allocated to a host register, its value inside the // `ChipState` must already be correct. if let Some ( ( host_reg , use_idx ) ) = self . reg_map [ reg as usize ] . take ( ) { debug ! ( " " reg host_reg use_idx ) ; // Mark the reg as free self . free_host_regs . insert ( host_reg ) ; let offset = self . calc_offset ( | state | & state . regs [ reg as usize ] ) ; self . emit_state_store_u8 ( offset , host_reg ) ; true } else { false } }
Generates spill code writing the current value of the given CHIP-8 register into the
`ChipState`.
Generates spill code writing the current value of the given CHIP - 8 register into the ` ChipState ` .
&mut self
reg
u8
&mut self
reg
u8