If you attempt to store an immediate into a large offset from a base register, we attempt to use the scratch register to hold both the calculated offset, as well as the immediate. This currently results in a bogus value being written into the correct location, rather than a sane value being written into a bogus location.
Created attachment 602875 [details] [diff] [review] /home/mrosenberg/patches/scratchOverwrite-r0.patch The inevitable has happened, and I'm giving in and taking a second scratch register for ARM. the previously unused link register will become the second scratch register. Previously, it was only used in one spot, but I'd missed a whole load of cases where two different values need to be in a scratch register at the same time