Skip to content

Commit

Permalink
[ARM] 3524/1: ARM EABI: more 64-bit aligned stack fixes
Browse files Browse the repository at this point in the history
Patch from Nicolas Pitre

Assembly code that calls C code must ensure the C code sees a 64-bit
aligned stack pointer.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Nicolas Pitre authored and Russell King committed May 16, 2006
1 parent 2ceec0c commit 1d6760a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/arm/lib/backtrace.S
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ ENTRY(c_backtrace)
#define reg r5
#define stack r6

.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, lr}
.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, r8, lr}
mov stack, r0
mov instr, r1
mov reg, #9
Expand All @@ -145,7 +145,7 @@ ENTRY(c_backtrace)
adrne r0, .Lcr
blne printk
mov r0, stack
LOADREGS(fd, sp!, {instr, reg, stack, r7, pc})
LOADREGS(fd, sp!, {instr, reg, stack, r7, r8, pc})

.Lfp: .asciz " r%d = %08X%c"
.Lcr: .asciz "\n"
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/lib/div64.S
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ ENTRY(__do_div64)
moveq pc, lr

@ Division by 0:
str lr, [sp, #-4]!
str lr, [sp, #-8]!
bl __div0

@ as wrong as it could be...
mov yl, #0
mov yh, #0
mov xh, #0
ldr pc, [sp], #4
ldr pc, [sp], #8

0 comments on commit 1d6760a

Please sign in to comment.