1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-01-11 23:52:54 +00:00

Fix bad code generation

multiple modifications of the same variable between sequence
points leads to undefined behaviour.
This commit is contained in:
Olaf Seibert 2015-04-27 23:20:16 +02:00
parent 58b59dbaa1
commit f5ed23867f

View File

@ -235,7 +235,8 @@ typedef int pcinc_t; /* Type of all instruction routines */
#if KLH10_EXTADR
# define PC_ADDXCT(x) { register pcinc_t i__ = (x); if (i__) PC_ADD(i__); }
#else
# define PC_ADDXCT(x) (cpu.mr_PC += (x)) /* For now; fix up later? */
# define PC_ADDXCT(x) { volatile pcinc_t i__ = (x); cpu.mr_PC += i__; }
/*# define PC_ADDXCT(x) (cpu.mr_PC += (x)) / * For now; fix up later? */
#endif
/* Macros for putting PC into a word.