1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-03 15:29:45 +00:00

Slightly reduces branching.

This commit is contained in:
Thomas Harte 2020-10-09 22:21:55 -04:00
parent abcd86a294
commit c01bc784b9
2 changed files with 4 additions and 13 deletions

View File

@ -11,7 +11,7 @@
#include <algorithm>
#include <cstring>
#define BE_NOISY
//#define BE_NOISY
using namespace CPU::MOS6502;

View File

@ -185,21 +185,12 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
continue;
case OperationCopyAToData:
if(m_flag()) {
data_buffer_.size = 1;
data_buffer_.value = a_.halves.low;
} else {
data_buffer_.size = 2;
data_buffer_.value = a_.full;
}
data_buffer_.value = a_.full & m_masks_[1];
data_buffer_.size = 2 - m_flag();
continue;
case OperationCopyDataToA:
if(m_flag()) {
a_.halves.low = data_buffer_.value;
} else {
a_.full = data_buffer_.value;
}
a_.full = (a_.full & m_masks_[0]) + (data_buffer_.value & m_masks_[1]);
continue;
case OperationCopyPBRToData: