diff options
Diffstat (limited to 'ports/sysdeps/unix/sysv')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S | 4 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/clone.S | 4 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/mmap.S | 8 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/mmap64.S | 8 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h | 32 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c | 4 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c | 4 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/syscall.S | 4 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/sysdep.h | 27 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/arm/vfork.S | 2 |
10 files changed, 48 insertions, 49 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index 29edec69d2..6ee7a1aebd 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S @@ -53,7 +53,7 @@ longjmp_msg: cfi_remember_state; \ cmp sp, reg; \ bls .Lok; \ - str r7, [sp, #-4]!; \ + push { r7 }; \ cfi_adjust_cfa_offset (4); \ cfi_rel_offset (r7, 0); \ mov r5, r0; \ @@ -79,7 +79,7 @@ longjmp_msg: .Lfail: \ add sp, sp, #12; \ cfi_adjust_cfa_offset (-12); \ - ldr r7, [sp], #4; \ + pop { r7 }; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (r7); \ CALL_FAIL \ diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S index 9009393f33..ce9c2a5ba1 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/clone.S +++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S @@ -49,7 +49,7 @@ ENTRY(__clone) mov ip, r2 #endif @ new sp is already in r1 - stmfd sp!, {r4, r7} + push {r4, r7} cfi_adjust_cfa_offset (8) cfi_rel_offset (r4, 0) cfi_rel_offset (r7, 4) @@ -61,7 +61,7 @@ ENTRY(__clone) cfi_endproc cmp r0, #0 beq 1f - ldmfd sp!, {r4, r7} + pop {r4, r7} blt PLTJMP(C_SYMBOL_NAME(__syscall_error)) RETINSTR(, lr) diff --git a/ports/sysdeps/unix/sysv/linux/arm/mmap.S b/ports/sysdeps/unix/sysv/linux/arm/mmap.S index 68560b065e..06b737eebe 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/mmap.S +++ b/ports/sysdeps/unix/sysv/linux/arm/mmap.S @@ -23,11 +23,11 @@ ENTRY (__mmap) /* shuffle args */ - str r5, [sp, #-4]! + push { r5 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r5, 0) ldr r5, [sp, #8] - str r4, [sp, #-4]! + push { r4 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r4, 0) cfi_remember_state @@ -43,10 +43,10 @@ ENTRY (__mmap) /* restore registers */ 2: - ldr r4, [sp], #4 + pop { r4 } cfi_adjust_cfa_offset (-4) cfi_restore (r4) - ldr r5, [sp], #4 + pop { r5 } cfi_adjust_cfa_offset (-4) cfi_restore (r5) diff --git a/ports/sysdeps/unix/sysv/linux/arm/mmap64.S b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S index dcbab3aed6..d039129b29 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/mmap64.S +++ b/ports/sysdeps/unix/sysv/linux/arm/mmap64.S @@ -34,11 +34,11 @@ .text ENTRY (__mmap64) ldr ip, [sp, $LOW_OFFSET] - str r5, [sp, #-4]! + push { r5 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r5, 0) ldr r5, [sp, $HIGH_OFFSET] - str r4, [sp, #-4]! + push { r4 } cfi_adjust_cfa_offset (4) cfi_rel_offset (r4, 0) cfi_remember_state @@ -51,7 +51,7 @@ ENTRY (__mmap64) orr r5, ip, r5, lsl $20 @ compose page offset DO_CALL (mmap2, 0) cmn r0, $4096 - ldmfd sp!, {r4, r5} + pop {r4, r5} cfi_adjust_cfa_offset (-8) cfi_restore (r4) cfi_restore (r5) @@ -62,7 +62,7 @@ ENTRY (__mmap64) cfi_restore_state .Linval: mov r0, $-EINVAL - ldmfd sp!, {r4, r5} + pop {r4, r5} cfi_adjust_cfa_offset (-8) cfi_restore (r4) cfi_restore (r5) diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h index 2fc053523f..59b826ded4 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h @@ -76,19 +76,19 @@ # define DOCARGS_0 \ .save {r7}; \ - str lr, [sp, #-4]!; \ + push {lr}; \ cfi_adjust_cfa_offset (4); \ cfi_rel_offset (lr, 0); \ .save {lr} # define UNDOCARGS_0 # define RESTORE_LR_0 \ - ldr lr, [sp], #4; \ + pop {lr}; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (lr) # define DOCARGS_1 \ .save {r7}; \ - stmfd sp!, {r0, r1, lr}; \ + push {r0, r1, lr}; \ cfi_adjust_cfa_offset (12); \ cfi_rel_offset (lr, 8); \ .save {lr}; \ @@ -102,13 +102,13 @@ # define DOCARGS_2 \ .save {r7}; \ - stmfd sp!, {r0, r1, lr}; \ + push {r0, r1, lr}; \ cfi_adjust_cfa_offset (12); \ cfi_rel_offset (lr, 8); \ .save {lr}; \ .pad #8 # define UNDOCARGS_2 \ - ldmfd sp!, {r0, r1}; \ + pop {r0, r1}; \ cfi_adjust_cfa_offset (-8); \ RESTART_UNWIND # define RESTORE_LR_2 \ @@ -116,13 +116,13 @@ # define DOCARGS_3 \ .save {r7}; \ - stmfd sp!, {r0, r1, r2, r3, lr}; \ + push {r0, r1, r2, r3, lr}; \ cfi_adjust_cfa_offset (20); \ cfi_rel_offset (lr, 16); \ .save {lr}; \ .pad #16 # define UNDOCARGS_3 \ - ldmfd sp!, {r0, r1, r2, r3}; \ + pop {r0, r1, r2, r3}; \ cfi_adjust_cfa_offset (-16); \ RESTART_UNWIND # define RESTORE_LR_3 \ @@ -130,13 +130,13 @@ # define DOCARGS_4 \ .save {r7}; \ - stmfd sp!, {r0, r1, r2, r3, lr}; \ + push {r0, r1, r2, r3, lr}; \ cfi_adjust_cfa_offset (20); \ cfi_rel_offset (lr, 16); \ .save {lr}; \ .pad #16 # define UNDOCARGS_4 \ - ldmfd sp!, {r0, r1, r2, r3}; \ + pop {r0, r1, r2, r3}; \ cfi_adjust_cfa_offset (-16); \ RESTART_UNWIND # define RESTORE_LR_4 \ @@ -145,13 +145,13 @@ /* r4 is only stmfd'ed for correct stack alignment. */ # define DOCARGS_5 \ .save {r4, r7}; \ - stmfd sp!, {r0, r1, r2, r3, r4, lr}; \ + push {r0, r1, r2, r3, r4, lr}; \ cfi_adjust_cfa_offset (24); \ cfi_rel_offset (lr, 20); \ .save {lr}; \ .pad #20 # define UNDOCARGS_5 \ - ldmfd sp!, {r0, r1, r2, r3}; \ + pop {r0, r1, r2, r3}; \ cfi_adjust_cfa_offset (-16); \ .fnend; \ .fnstart; \ @@ -159,20 +159,20 @@ .save {lr}; \ .pad #4 # define RESTORE_LR_5 \ - ldmfd sp!, {r4, lr}; \ + pop {r4, lr}; \ cfi_adjust_cfa_offset (-8); \ /* r4 will be marked as restored later. */ \ cfi_restore (lr) # define DOCARGS_6 \ .save {r4, r5, r7}; \ - stmfd sp!, {r0, r1, r2, r3, lr}; \ + push {r0, r1, r2, r3, lr}; \ cfi_adjust_cfa_offset (20); \ cfi_rel_offset (lr, 16); \ .save {lr}; \ .pad #16 # define UNDOCARGS_6 \ - ldmfd sp!, {r0, r1, r2, r3}; \ + pop {r0, r1, r2, r3}; \ cfi_adjust_cfa_offset (-16); \ .fnend; \ .fnstart; \ @@ -213,13 +213,13 @@ extern int __local_multiple_threads attribute_hidden; header.multiple_threads) == 0, 1) # else # define SINGLE_THREAD_P \ - stmfd sp!, {r0, lr}; \ + push {r0, lr}; \ cfi_adjust_cfa_offset (8); \ cfi_rel_offset (lr, 4); \ GET_TLS (lr); \ NEGOFF_ADJ_BASE (r0, MULTIPLE_THREADS_OFFSET); \ ldr ip, NEGOFF_OFF1 (r0, MULTIPLE_THREADS_OFFSET); \ - ldmfd sp!, {r0, lr}; \ + pop {r0, lr}; \ cfi_adjust_cfa_offset (-8); \ cfi_restore (lr); \ teq ip, #0 diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c index caa6a26260..108924d8b3 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -93,7 +93,7 @@ asm ( "_Unwind_Resume:\n" " .cfi_sections .debug_frame\n" " " CFI_STARTPROC "\n" -" stmfd sp!, {r4, r5, r6, lr}\n" +" push {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (16)" \n" " " CFI_REL_OFFSET (r4, 0) "\n" " " CFI_REL_OFFSET (r5, 4) "\n" @@ -108,7 +108,7 @@ asm ( " cmp r3, #0\n" " beq 4f\n" "5: mov r0, r6\n" -" ldmfd sp!, {r4, r5, r6, lr}\n" +" pop {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (-16) "\n" " " CFI_RESTORE (r4) "\n" " " CFI_RESTORE (r5) "\n" diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c index 1211599131..d155ea7dc4 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -56,7 +56,7 @@ asm ( "_Unwind_Resume:\n" " .cfi_sections .debug_frame\n" " " CFI_STARTPROC "\n" -" stmfd sp!, {r4, r5, r6, lr}\n" +" push {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (16)" \n" " " CFI_REL_OFFSET (r4, 0) "\n" " " CFI_REL_OFFSET (r5, 4) "\n" @@ -71,7 +71,7 @@ asm ( " cmp r3, #0\n" " beq 4f\n" "5: mov r0, r6\n" -" ldmfd sp!, {r4, r5, r6, lr}\n" +" pop {r4, r5, r6, lr}\n" " " CFI_ADJUST_CFA_OFFSET (-16) "\n" " " CFI_RESTORE (r4) "\n" " " CFI_RESTORE (r5) "\n" diff --git a/ports/sysdeps/unix/sysv/linux/arm/syscall.S b/ports/sysdeps/unix/sysv/linux/arm/syscall.S index 665ecb4de0..bdd5a52be8 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/syscall.S +++ b/ports/sysdeps/unix/sysv/linux/arm/syscall.S @@ -23,7 +23,7 @@ ENTRY (syscall) mov ip, sp - stmfd sp!, {r4, r5, r6, r7} + push {r4, r5, r6, r7} cfi_adjust_cfa_offset (16) cfi_rel_offset (r4, 0) cfi_rel_offset (r5, 4) @@ -35,7 +35,7 @@ ENTRY (syscall) mov r2, r3 ldmfd ip, {r3, r4, r5, r6} swi 0x0 - ldmfd sp!, {r4, r5, r6, r7} + pop {r4, r5, r6, r7} cfi_adjust_cfa_offset (-16) cfi_restore (r4) cfi_restore (r5) diff --git a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h index dc2058b275..f2ab5f589f 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -147,23 +147,22 @@ __local_syscall_error: \ # else # if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) # define POP_PC \ - ldr lr, [sp], #4; \ + pop { lr }; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (lr); \ bx lr # else -# define POP_PC \ - ldr pc, [sp], #4 +# define POP_PC pop { pc } # endif # define SYSCALL_ERROR_HANDLER \ __local_syscall_error: \ - str lr, [sp, #-4]!; \ + push { lr }; \ cfi_adjust_cfa_offset (4); \ cfi_rel_offset (lr, 0); \ - str r0, [sp, #-4]!; \ + push { r0 }; \ cfi_adjust_cfa_offset (4); \ bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \ - ldr r1, [sp], #4; \ + pop { r1 }; \ cfi_adjust_cfa_offset (-4); \ rsb r1, r1, #0; \ str r1, [r0]; \ @@ -230,7 +229,7 @@ __local_syscall_error: \ #undef DOARGS_0 #define DOARGS_0 \ .fnstart; \ - str r7, [sp, #-4]!; \ + push { r7 }; \ cfi_adjust_cfa_offset (4); \ cfi_rel_offset (r7, 0); \ .save { r7 } @@ -245,7 +244,7 @@ __local_syscall_error: \ #undef DOARGS_5 #define DOARGS_5 \ .fnstart; \ - stmfd sp!, {r4, r7}; \ + push {r4, r7}; \ cfi_adjust_cfa_offset (8); \ cfi_rel_offset (r4, 0); \ cfi_rel_offset (r7, 4); \ @@ -255,7 +254,7 @@ __local_syscall_error: \ #define DOARGS_6 \ .fnstart; \ mov ip, sp; \ - stmfd sp!, {r4, r5, r7}; \ + push {r4, r5, r7}; \ cfi_adjust_cfa_offset (12); \ cfi_rel_offset (r4, 0); \ cfi_rel_offset (r5, 4); \ @@ -266,7 +265,7 @@ __local_syscall_error: \ #define DOARGS_7 \ .fnstart; \ mov ip, sp; \ - stmfd sp!, {r4, r5, r6, r7}; \ + push {r4, r5, r6, r7}; \ cfi_adjust_cfa_offset (16); \ cfi_rel_offset (r4, 0); \ cfi_rel_offset (r5, 4); \ @@ -277,7 +276,7 @@ __local_syscall_error: \ #undef UNDOARGS_0 #define UNDOARGS_0 \ - ldr r7, [sp], #4; \ + pop {r7}; \ cfi_adjust_cfa_offset (-4); \ cfi_restore (r7); \ .fnend @@ -291,14 +290,14 @@ __local_syscall_error: \ #define UNDOARGS_4 UNDOARGS_0 #undef UNDOARGS_5 #define UNDOARGS_5 \ - ldmfd sp!, {r4, r7}; \ + pop {r4, r7}; \ cfi_adjust_cfa_offset (-8); \ cfi_restore (r4); \ cfi_restore (r7); \ .fnend #undef UNDOARGS_6 #define UNDOARGS_6 \ - ldmfd sp!, {r4, r5, r7}; \ + pop {r4, r5, r7}; \ cfi_adjust_cfa_offset (-12); \ cfi_restore (r4); \ cfi_restore (r5); \ @@ -306,7 +305,7 @@ __local_syscall_error: \ .fnend #undef UNDOARGS_7 #define UNDOARGS_7 \ - ldmfd sp!, {r4, r5, r6, r7}; \ + pop {r4, r5, r6, r7}; \ cfi_adjust_cfa_offset (-16); \ cfi_restore (r4); \ cfi_restore (r5); \ diff --git a/ports/sysdeps/unix/sysv/linux/arm/vfork.S b/ports/sysdeps/unix/sysv/linux/arm/vfork.S index ae931f79c6..128a6402b9 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/vfork.S +++ b/ports/sysdeps/unix/sysv/linux/arm/vfork.S @@ -37,7 +37,7 @@ ENTRY (__vfork) mov ip, r7 cfi_register (r7, ip) .fnstart - str r7, [sp, #-4]! + push { r7 } cfi_adjust_cfa_offset (4) .save { r7 } ldr r7, =SYS_ify (vfork) |