about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/aarch64/ioctl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/aarch64/ioctl.S')
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/ioctl.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/ioctl.S b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
index eb2f7211d7..88c8143452 100644
--- a/sysdeps/unix/sysv/linux/aarch64/ioctl.S
+++ b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
@@ -22,6 +22,11 @@
 ENTRY(__ioctl)
 	mov	x8, #__NR_ioctl
 	sxtw	x0, w0
+#ifdef __CHERI_PURE_CAPABILITY__
+	cbz	x9, L(skip_arg3)
+	ldr	c2, [c9]
+L(skip_arg3):
+#endif
 	svc	#0x0
 	cmn	x0, #4095
 	b.cs	.Lsyscall_error