[Lldb-commits] [lldb] [llvm] [AArch64] Fix definition of system register move instructions (PR #185709)

Nathan Chancellor via lldb-commits lldb-commits at lists.llvm.org
Fri May 29 21:04:29 PDT 2026


nathanchance wrote:

For the record, this breaks software like the Linux kernel:

```
arch/arm64/lib/delay.c:52:3: error: expected writable system register or pstate
   52 |                 wfit(end);
      |                 ^
arch/arm64/include/asm/barrier.h:24:32: note: expanded from macro 'wfit'
   24 | #define wfit(val)       asm volatile("msr s0_3_c1_c0_1, %0"     \
      |                                      ^
<inline asm>:1:6: note: instantiated into assembly here
    1 |         msr s0_3_c1_c0_1, x26
      |             ^
arch/arm64/lib/delay.c:54:4: error: expected writable system register or pstate
   54 |                         wfet(end);
      |                         ^
arch/arm64/include/asm/barrier.h:21:32: note: expanded from macro 'wfet'
   21 | #define wfet(val)       asm volatile("msr s0_3_c1_c0_0, %0"     \
      |                                      ^
<inline asm>:1:6: note: instantiated into assembly here
    1 |         msr s0_3_c1_c0_0, x26
      |             ^
2 errors generated.
```

https://git.kernel.org/linus/9eae588529751f95834bca775b30b66291def7f6

I take it this is intentional from the test changes? Is the GNU assembler going to make a similar change? It would be odd for clang to reject a construct supported by other assembler implementations. If this is intentional, I can push to adjust the kernel side, but I just want to make sure there is nothing to adjust on the toolchain side.

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


More information about the lldb-commits mailing list