1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Ensures 16-bit values of Xn for (d8, An, Xn) are sign extended.

This commit is contained in:
Thomas Harte 2019-04-22 22:13:02 -04:00
parent 20e774be1e
commit 7c132a3ed5

View File

@ -1266,7 +1266,7 @@ template <class T, bool dtack_is_implicit> void Processor<T, dtack_is_implicit>:
target.full = int8_t(data.halves.low) + source; \
\
if(data.full & 0x800) { \
target.full += displacement.halves.low.full; \
target.full += int16_t(displacement.halves.low.full); \
} else { \
target.full += displacement.full; \
} \