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:
parent
abcd86a294
commit
c01bc784b9
@ -11,7 +11,7 @@
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
#define BE_NOISY
|
||||
//#define BE_NOISY
|
||||
|
||||
using namespace CPU::MOS6502;
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user