squeeze a few nsec out of MOV
This commit is contained in:
parent
dbe374b4bf
commit
62150f45de
1 changed files with 3 additions and 3 deletions
6
op4.py
6
op4.py
|
@ -68,9 +68,9 @@ def op01_mov(cpu, inst):
|
|||
# avoid call to the more-general operandx for mode 0, direct register.
|
||||
# This optimization is a substantial speed up for register MOVs.
|
||||
srcb6 = (inst & 0o7700) >> 6
|
||||
if srcb6 < 8:
|
||||
val = cpu.r[srcb6]
|
||||
else:
|
||||
try:
|
||||
val = cpu.r[srcb6] # only works if srcb6 < 8; register direct
|
||||
except IndexError:
|
||||
val = cpu.operandx(srcb6)
|
||||
|
||||
cpu.psw_v = 0 # per manual; V is cleared
|
||||
|
|
Loading…
Add table
Reference in a new issue