Am 04.11.25 um 00:13 schrieb Basil Hussain:
Link to thread:
https://www.eevblog.com/forum/microcontrollers/w10-sdcc-4-2-0-generates-
unpredictable-results-but-with-w7-all-is-fine/
Details about the situation are not forthcoming, but some of the
apparent facts seem to be:
- Same SDCC binaries (of v4.2.0) are being run on W7 and W10.
- Behaviour doesn't change if SDCC executables are set to run in W7
compatibility mode.
- Code size inconsistency appears to be due to differing register
allocations each time, which causes different code to be generated.
[…]
Anyone with any thoughts on this? Perhaps a latent bug in SDCC revealed
by a subtle difference in behaviour of W10/11 versus W7? I know Philipp
has occasionally posted on EEVblog forums in the past, so perhaps he
could engage there?
From the information there, I cannot track down the issue.
However, from that thread, the sdcc_diff.txt indicates that the
difference is in the allocation of variables on the stack. That happens
in src/SDCCsalloc.hpp. It was affected by
https://sourceforge.net/p/sdcc/bugs/3772/, which was a bug in the boost
library, which might be able to cause the issues discussed.
Philipp
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user