mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-13 06:23:59 +00:00
Simplifies and fixes post-inc MOVE behaviour.
This commit is contained in:
parent
958d44a20d
commit
0bb6b498ce
@ -2843,20 +2843,19 @@ struct ProcessorStorageConstructor {
|
|||||||
|
|
||||||
// If any post-incrementing was involved, do the post increment(s).
|
// If any post-incrementing was involved, do the post increment(s).
|
||||||
if(ea_mode == PostInc || destination_mode == PostInc) {
|
if(ea_mode == PostInc || destination_mode == PostInc) {
|
||||||
if(ea_mode == destination_mode) {
|
const int ea_inc = inc(ea_register);
|
||||||
const int ea_inc = inc(ea_mode);
|
const int destination_inc = inc(destination_register);
|
||||||
const int destination_inc = inc(destination_mode);
|
|
||||||
if(ea_inc == destination_inc) {
|
// If there are two increments, and both can be done simultaneously, do that.
|
||||||
|
// Otherwise do one or two individually.
|
||||||
|
if(ea_mode == destination_mode && ea_inc == destination_inc) {
|
||||||
op(ea_inc | MicroOp::SourceMask | MicroOp::DestinationMask);
|
op(ea_inc | MicroOp::SourceMask | MicroOp::DestinationMask);
|
||||||
} else {
|
|
||||||
op(ea_inc | MicroOp::SourceMask);
|
|
||||||
op(destination_inc | MicroOp::DestinationMask);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if(ea_mode == PostInc) {
|
if(ea_mode == PostInc) {
|
||||||
op(inc(ea_mode) | MicroOp::SourceMask);
|
op(ea_inc | MicroOp::SourceMask);
|
||||||
} else {
|
}
|
||||||
op(inc(destination_mode) | MicroOp::DestinationMask);
|
if(destination_mode == PostInc) {
|
||||||
|
op(destination_inc | MicroOp::DestinationMask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user