mirror of
https://github.com/PDP-10/klh10.git
synced 2026-04-03 12:22:55 +00:00
Fix bad code generation
multiple modifications of the same variable between sequence points leads to undefined behaviour.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user