[llvm] [AVR] No cli for SPWRITE on XMEGA (PR #147210)

Ben Shi via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 6 21:36:19 PDT 2025


benshi001 wrote:

> From the XMEGA series manual: _To prevent corruption when updating the stack pointer from software, a write to SPL will automatically disable interrupts for up to four instructions or until the next I/O memory write._
> 
> This will save 6! instructions in every function with an FP on ALL Xmega devices and it is compatible with gcc code generation for all those devices. It is also not very modern, because the first devices are from 2013. So this is really significant and it is a small change.
> 
> @benshi001 Note that I could not find any existing (SPWRITE) unit tests to which this variant could be added.

You are appreciated to give a link about how gcc handles this.

https://github.com/llvm/llvm-project/pull/147210


More information about the llvm-commits mailing list