From 9bc326d18b321b95014562e635a545026c864161 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 18 Sep 2016 17:23:53 +0000 Subject: [PATCH] Fix badly computed register/stack offset of system call output arguments. Bugs in the Python code used to generate this vDSO caused us to miscompute the register numbers/stack offsets at which addresses of the system call output arguments were stored. Together with some other patches, this vDSO allows us to make all of the cloudlibc unit tests pass. Obtained from: https://github.com/NuxiNL/cloudabi --- sys/contrib/cloudabi/cloudabi_vdso_armv6.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/contrib/cloudabi/cloudabi_vdso_armv6.S b/sys/contrib/cloudabi/cloudabi_vdso_armv6.S index ec40f801a1ff..85d2f5bc38a9 100644 --- a/sys/contrib/cloudabi/cloudabi_vdso_armv6.S +++ b/sys/contrib/cloudabi/cloudabi_vdso_armv6.S @@ -48,11 +48,10 @@ ENTRY(cloudabi_sys_clock_res_get) END(cloudabi_sys_clock_res_get) ENTRY(cloudabi_sys_clock_time_get) - str r3, [sp, #-4] mov ip, #1 swi 0 - ldr r2, [sp, #-4] bcs 1f + ldr r2, [sp, #0] str r0, [r2, 0] str r1, [r2, 4] mov r0, $0 @@ -227,7 +226,7 @@ ENTRY(cloudabi_sys_file_open) mov ip, #21 swi 0 bcs 1f - ldr r2, [sp, #12] + ldr r2, [sp, #8] str r0, [r2] mov r0, $0 1: @@ -249,7 +248,7 @@ ENTRY(cloudabi_sys_file_readlink) mov ip, #23 swi 0 bcs 1f - ldr r2, [sp, #8] + ldr r2, [sp, #4] str r0, [r2] mov r0, $0 1: @@ -367,7 +366,7 @@ ENTRY(cloudabi_sys_poll_fd) mov ip, #40 swi 0 bcs 1f - ldr r2, [sp, #12] + ldr r2, [sp, #8] str r0, [r2] mov r0, $0 1: