From 5af9358a8cf0bf1fab9e94bbe568a0ba0bb0c6f2 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 12 Nov 2025 11:21:09 -0800 Subject: [PATCH] [libunwind] Fix build error because of wrong register size This patch should fix an libunwind build failure that happens on Chromium's Android bots: https://github.com/llvm/llvm-project/pull/165066#issuecomment-3521706265 The issue is that we're using the `wzr` register to move the value 0 in x1, but this is the 32-bit register. To prevent this issue, we use an immediate instead of the zero registers. Signed-off-by: Med Ismail Bennani --- libunwind/src/UnwindLevel1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libunwind/src/UnwindLevel1.c b/libunwind/src/UnwindLevel1.c index 79398bac8b531..73a27928e91d1 100644 --- a/libunwind/src/UnwindLevel1.c +++ b/libunwind/src/UnwindLevel1.c @@ -82,7 +82,7 @@ void *shstkRegContext = __libunwind_shstk_get_registers((cursor)); \ void *shstkJumpAddress = __libunwind_shstk_get_jump_target(); \ __asm__ volatile("mov x0, %0\n\t" \ - "mov x1, wzr\n\t" \ + "mov x1, #0\n\t" \ "br %1\n\t" \ : \ : "r"(shstkRegContext), "r"(shstkJumpAddress) \