1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-24 12:30:17 +00:00

Resolve assumption of arithmetic shifts.

This commit is contained in:
Thomas Harte 2022-06-24 07:26:07 -04:00
parent 4ed3b21bf3
commit 069a057a94

View File

@ -925,7 +925,7 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
result += (a & mask) + (data_buffer_.value & mask); \
partials += result & mask; \
result -= ((result - carry) >> 16) & adjustment; \
result &= (carry & ~(result >> 31)) | (carry - 1);
result &= (carry & ~(result >> 1)) | (carry - 1);
// i.e. add the next nibble to that in the accumulator, with carry, and
// store it to result. Keep a copy for the partials.