ASH clean-up
This commit is contained in:
parent
cf9a19e49d
commit
acb1e28642
1 changed files with 4 additions and 6 deletions
10
cpu.cpp
10
cpu.cpp
|
@ -830,15 +830,13 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int shift_n = 64 - shift;
|
int shift_n = 64 - shift;
|
||||||
uint32_t sign_extend = sign ? 0x8000 : 0;
|
uint64_t value = (0xffffffff00000000ll | R) >> shift_n;
|
||||||
|
|
||||||
for(int i=0; i<shift_n; i++) {
|
setPSW_c(R >> (shift_n - 1));
|
||||||
setPSW_c(R & 1);
|
|
||||||
R >>= 1;
|
|
||||||
R |= sign_extend;
|
|
||||||
}
|
|
||||||
|
|
||||||
setPSW_v(SIGN(R, wm_word) != SIGN(oldR, wm_word));
|
setPSW_v(SIGN(R, wm_word) != SIGN(oldR, wm_word));
|
||||||
|
|
||||||
|
R = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
R &= 0xffff;
|
R &= 0xffff;
|
||||||
|
|
Loading…
Add table
Reference in a new issue