mirror of https://github.com/stella-emu/stella.git
A few micro-optimizations in the 6502 emulation (found by cppcheck).
This commit is contained in:
parent
8c7488914d
commit
c901f282bb
|
@ -616,10 +616,10 @@ case 0x4b:
|
|||
// Set carry flag according to the right-most bit
|
||||
C = A & 0x01;
|
||||
|
||||
A = (A >> 1) & 0x7f;
|
||||
A >>= 1;
|
||||
|
||||
notZ = A;
|
||||
N = A & 0x80;
|
||||
N = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2671,10 +2671,10 @@ case 0x4a:
|
|||
// Set carry flag according to the right-most bit
|
||||
C = A & 0x01;
|
||||
|
||||
A = (A >> 1) & 0x7f;
|
||||
A >>= 1;
|
||||
|
||||
notZ = A;
|
||||
N = A & 0x80;
|
||||
N = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2689,11 +2689,11 @@ case 0x46:
|
|||
// Set carry flag according to the right-most bit in value
|
||||
C = operand & 0x01;
|
||||
|
||||
operand = (operand >> 1) & 0x7f;
|
||||
operand >>= 1;
|
||||
poke(operandAddress, operand, DISASM_WRITE);
|
||||
|
||||
notZ = operand;
|
||||
N = operand & 0x80;
|
||||
N = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2709,11 +2709,11 @@ case 0x56:
|
|||
// Set carry flag according to the right-most bit in value
|
||||
C = operand & 0x01;
|
||||
|
||||
operand = (operand >> 1) & 0x7f;
|
||||
operand >>= 1;
|
||||
poke(operandAddress, operand, DISASM_WRITE);
|
||||
|
||||
notZ = operand;
|
||||
N = operand & 0x80;
|
||||
N = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2728,11 +2728,11 @@ case 0x4e:
|
|||
// Set carry flag according to the right-most bit in value
|
||||
C = operand & 0x01;
|
||||
|
||||
operand = (operand >> 1) & 0x7f;
|
||||
operand >>= 1;
|
||||
poke(operandAddress, operand, DISASM_WRITE);
|
||||
|
||||
notZ = operand;
|
||||
N = operand & 0x80;
|
||||
N = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2749,11 +2749,11 @@ case 0x5e:
|
|||
// Set carry flag according to the right-most bit in value
|
||||
C = operand & 0x01;
|
||||
|
||||
operand = (operand >> 1) & 0x7f;
|
||||
operand >>= 1;
|
||||
poke(operandAddress, operand, DISASM_WRITE);
|
||||
|
||||
notZ = operand;
|
||||
N = operand & 0x80;
|
||||
N = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -482,10 +482,10 @@ define(M6502_ASR, `{
|
|||
// Set carry flag according to the right-most bit
|
||||
C = A & 0x01;
|
||||
|
||||
A = (A >> 1) & 0x7f;
|
||||
A >>= 1;
|
||||
|
||||
notZ = A;
|
||||
N = A & 0x80;
|
||||
N = 0;
|
||||
}')
|
||||
|
||||
define(M6502_BIT, `{
|
||||
|
@ -691,21 +691,21 @@ define(M6502_LSR, `{
|
|||
// Set carry flag according to the right-most bit in value
|
||||
C = operand & 0x01;
|
||||
|
||||
operand = (operand >> 1) & 0x7f;
|
||||
operand >>= 1;
|
||||
poke(operandAddress, operand, DISASM_WRITE);
|
||||
|
||||
notZ = operand;
|
||||
N = operand & 0x80;
|
||||
N = 0;
|
||||
}')
|
||||
|
||||
define(M6502_LSRA, `{
|
||||
// Set carry flag according to the right-most bit
|
||||
C = A & 0x01;
|
||||
|
||||
A = (A >> 1) & 0x7f;
|
||||
A >>= 1;
|
||||
|
||||
notZ = A;
|
||||
N = A & 0x80;
|
||||
N = 0;
|
||||
}')
|
||||
|
||||
define(M6502_LXA, `{
|
||||
|
|
Loading…
Reference in New Issue