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
This commit is contained in:
Ed Schouten 2016-09-18 17:23:53 +00:00
parent d33dad44da
commit 9bc326d18b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305938

View File

@ -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: