diff options
Diffstat (limited to 'ports/sysdeps/unix')
-rw-r--r-- | ports/sysdeps/unix/arm/sysdep.S | 5 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/clone.S | 4 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/mmap.S | 1 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/mmap64.S | 6 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/syscall.S | 1 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/sysdep.h | 1 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/vfork.S | 1 |
7 files changed, 15 insertions, 4 deletions
diff --git a/ports/sysdeps/unix/arm/sysdep.S b/ports/sysdeps/unix/arm/sysdep.S index 99bca9fab1..40e4d80eca 100644 --- a/ports/sysdeps/unix/arm/sysdep.S +++ b/ports/sysdeps/unix/arm/sysdep.S @@ -31,8 +31,9 @@ __syscall_error: /* We translate the system's EWOULDBLOCK error into EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN. EWOULDBLOCK_sys is the original number. */ - cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ - moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ + cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ + it eq + moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */ #endif #ifndef IS_IN_rtld diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S index de25db1609..732a3ffd01 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/clone.S +++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S @@ -33,6 +33,7 @@ ENTRY(__clone) @ sanity check args cmp r0, #0 + ite ne cmpne r1, #0 moveq r0, #-EINVAL beq PLTJMP(syscall_error) @@ -78,8 +79,9 @@ PSEUDO_END (__clone) sub pc, r0, #31 mov r1, r0 tst ip, #CLONE_VM - movne r0, #-1 ldr r7, =SYS_ify(getpid) + ite ne + movne r0, #-1 swieq 0x0 str r0, [r1, #PID_OFFSET] str r0, [r1, #TID_OFFSET] diff --git a/ports/sysdeps/unix/sysv/linux/arm/mmap.S b/ports/sysdeps/unix/sysv/linux/arm/mmap.S index fa8a2b86c8..68560b065e 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/ports/sysdeps/unix/sysv/linux/arm/mmap.S @@ -51,6 +51,7 @@ ENTRY (__mmap) cfi_restore (r5) cmn r0, $4096 + it cc RETINSTR(cc, lr) b PLTJMP(syscall_error) diff --git a/ports/sysdeps/unix/sysv/linux/arm/mmap64.S b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S index 2eafd1b413..dcbab3aed6 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -17,6 +17,8 @@ #include <sysdep.h> + .syntax unified + #define EINVAL 22 #ifdef __ARMEB__ @@ -42,7 +44,8 @@ ENTRY (__mmap64) cfi_remember_state movs r4, ip, lsl $20 @ check that offset is page-aligned mov ip, ip, lsr $12 - moveqs r4, r5, lsr $12 @ check for overflow + it eq + movseq r4, r5, lsr $12 @ check for overflow bne .Linval ldr r4, [sp, $8] @ load fd orr r5, ip, r5, lsl $20 @ compose page offset @@ -52,6 +55,7 @@ ENTRY (__mmap64) cfi_adjust_cfa_offset (-8) cfi_restore (r4) cfi_restore (r5) + it cc RETINSTR(cc, lr) b PLTJMP(syscall_error) diff --git a/ports/sysdeps/unix/sysv/linux/arm/syscall.S b/ports/sysdeps/unix/sysv/linux/arm/syscall.S index c6dd57d698..665ecb4de0 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/syscall.S +++ b/ports/sysdeps/unix/sysv/linux/arm/syscall.S @@ -42,6 +42,7 @@ ENTRY (syscall) cfi_restore (r6) cfi_restore (r7) cmn r0, #4096 + it cc RETINSTR(cc, lr) b PLTJMP(syscall_error) PSEUDO_END (syscall) diff --git a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h index f9b3443c14..f40cb95e87 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -64,6 +64,7 @@ cmn r0, $4096; #define PSEUDO_RET \ + it cc; \ RETINSTR(cc, lr); \ b PLTJMP(SYSCALL_ERROR) #undef ret diff --git a/ports/sysdeps/unix/sysv/linux/arm/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/vfork.S index 4f84c57f22..ae931f79c6 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/arm/vfork.S @@ -51,6 +51,7 @@ ENTRY (__vfork) RESTORE_PID #endif cmn a1, #4096 + it cc RETINSTR(cc, lr) b PLTJMP(SYSCALL_ERROR) |