Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/arm/quad Fix calling of __qdivrem which...
details: https://anonhg.NetBSD.org/src/rev/a90a33985e9c
branches: trunk
changeset: 786081:a90a33985e9c
user: matt <matt%NetBSD.org@localhost>
date: Sun Apr 14 15:53:30 2013 +0000
description:
Fix calling of __qdivrem which the 3rd arg needs to passed on the stack.
diffstat:
common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S | 9 +++++----
common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S | 10 ++++++----
2 files changed, 11 insertions(+), 8 deletions(-)
diffs (59 lines):
diff -r 5f809edf22e8 -r a90a33985e9c common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S
--- a/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S Sun Apr 14 15:11:52 2013 +0000
+++ b/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S Sun Apr 14 15:53:30 2013 +0000
@@ -29,7 +29,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: __aeabi_ldivmod.S,v 1.1 2012/08/05 06:33:51 matt Exp $")
+RCSID("$NetBSD: __aeabi_ldivmod.S,v 1.2 2013/04/14 15:53:30 matt Exp $")
ENTRY(__aeabi_ldivmod)
push {r4-r5, sl, lr}
@@ -64,9 +64,11 @@
* Arguments are setup, allocate some stack for the remainder
* and call __qdivrem for the heavy lifting.
*/
- sub sp, sp, #8
- mov r4, sp /* pointer to remainder */
+ sub sp, sp, #16
+ add ip, sp, #8
+ str ip, [sp]
bl PLT_SYM(__qdivrem)
+ add sp, sp, #8
teq NEG, #0 /* any signs to flip? */
/*
@@ -124,5 +126,4 @@
mov AHI, #0
pop {r4-r5, sl, lr}
RET
-
END(__aeabi_ldivmod)
diff -r 5f809edf22e8 -r a90a33985e9c common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S
--- a/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S Sun Apr 14 15:11:52 2013 +0000
+++ b/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S Sun Apr 14 15:53:30 2013 +0000
@@ -29,7 +29,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: __aeabi_uldivmod.S,v 1.2 2012/08/05 06:34:09 matt Exp $")
+RCSID("$NetBSD: __aeabi_uldivmod.S,v 1.3 2013/04/14 15:53:30 matt Exp $")
/*
* typedef struct { unsigned long long quo, rem } ulldiv_t;
@@ -39,9 +39,11 @@
ENTRY(__aeabi_uldivmod)
push {r4,lr}
- sub sp, sp, #8
- mov r4, sp
- bl PLT_SYM(__qdivrem)
+ sub sp, sp, #16
+ add ip, sp, #8
+ str ip, [sp]
+ blx PLT_SYM(__qdivrem)
+ add sp, sp, #8
/*
* The remainder is already on the stack just waiting to be popped
* into r2/r3.
Home |
Main Index |
Thread Index |
Old Index