* device/lib/ds390/__sdcc_atomic_maybe_rollback.c,
Another alternative is to disable interrupts during the atomic update. Btw a bit in PSW seems not such a good idea since PSW gets pushed, popped and loaded often in interrupt service routines.
I like this idea, but that is not something to be implemented during the 4.6.0. release.
Applied in [r16600].
* device/lib/ds390/__sdcc_atomic_maybe_rollback.c,
Good observation! But I think the patch can be even smaller by using XCH A,R0.
see also [#1015]
The option to disable atomics has also been mentioned in the original atomics issue [#624]