src/cpu/cpu.cc
/*
 * Checks if the cpu should poll for interrupts on this cycle.
 */
Checks if the cpu should poll for interrupts on this cycle.
Checks if the cpu should poll for interrupts on this cycle .
bool Cpu::CanPoll(void) {
  return ((current_sequence_[inst_pointer_]
       & MEMORY_OPERATION_MASK) != MEM_FETCH)
      && ((current_sequence_[inst_pointer_]
       & MEMORY_OPERATION_MASK) != MEM_BRANCH)
      && (inst_pointer_ + 1 < kInstSequenceSize_)
      && (((current_sequence_[inst_pointer_ + 1]
       & MEMORY_OPERATION_MASK) == MEM_FETCH)
      || ((current_sequence_[inst_pointer_ + 1]
       & MEMORY_OPERATION_MASK) == MEM_BRANCH))
      && (regs_->inst != INST_BRK);
}
bool Cpu :: CanPoll ( void ) { return ( ( current_sequence_ [ inst_pointer_ ] & MEMORY_OPERATION_MASK ) != MEM_FETCH ) && ( ( current_sequence_ [ inst_pointer_ ] & MEMORY_OPERATION_MASK ) != MEM_BRANCH ) && ( inst_pointer_ + 1 < kInstSequenceSize_ ) && ( ( ( current_sequence_ [ inst_pointer_ + 1 ] & MEMORY_OPERATION_MASK ) == MEM_FETCH ) || ( ( current_sequence_ [ inst_pointer_ + 1 ] & MEMORY_OPERATION_MASK ) == MEM_BRANCH ) ) && ( regs_ -> inst != INST_BRK ) ; }
Checks if the cpu should poll for interrupts on this cycle.
Checks if the cpu should poll for interrupts on this cycle .
// Interrupt polling (internal) happens when the cpu is about // to finish an instruction and said instruction is not an interrupt.