From 59c715383d2e186a2d964ae019f64a115d1395d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Tue, 3 Feb 2026 09:38:19 +0100 Subject: [PATCH] Fix callNative.S clang error for linux/aarch64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The instruction 'sub sp, sp, w3' is invalid because sp is 64-bit but w3 is 32-bit. GCC/GAS accepts this (and implicitly adds the uxtw extend specifier), but clang rejects it: error: too few operands for instruction sub sp, sp, w3 ^~~~~~~~~~~~~~ Fix this by making the zero-extend explicit, which works under both toolchains. Signed-off-by: Guillermo Rodríguez --- src/os/linux/aarch64/callNative.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/linux/aarch64/callNative.S b/src/os/linux/aarch64/callNative.S index e067c4f..b75f2e4 100644 --- a/src/os/linux/aarch64/callNative.S +++ b/src/os/linux/aarch64/callNative.S @@ -64,7 +64,7 @@ callJNIMethod: mov x29, sp stp x19, x20, [x29, #16] - sub sp, sp, w3 /* allocate room for stacked args */ + sub sp, sp, w3, uxtw /* allocate room for stacked args */ mov x14, sp mov x20, x4 /* preserve ostack */