summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-08-01 18:24:44 +0000
committerian <ian@FreeBSD.org>2014-08-01 18:24:44 +0000
commite51357b6187c97870de2c47648dee6c92d196ca1 (patch)
treee67c5f55367065d7db0d9ff02ccd6655b96346fd /sys/libkern
parent741bd8905ac2813b7a30d1f7155ad9621d4766ec (diff)
downloadFreeBSD-src-e51357b6187c97870de2c47648dee6c92d196ca1.zip
FreeBSD-src-e51357b6187c97870de2c47648dee6c92d196ca1.tar.gz
Fix unwind-info errors in our hand-written arm assembler code.
We have functions nested within functions, and places where we start a function then never end it, we just jump to the middle of something else. We tried to express this with nested ENTRY()/END() macros (which result in .fnstart and .fnend directives), but it turns out there's no way to express that nesting in ARM EHABI unwind info, and newer tools treat multiple .fnstart directives without an intervening .fnend as an error. These changes introduce two new macros, EENTRY() and EEND(). EENTRY() creates a global label you can call/jump to just like ENTRY(), but it doesn't emit a .fnstart. EEND() is a no-op that just documents the conceptual endpoint that matches up with the same-named EENTRY(). This is based on patches submitted by Stepan Dyatkovskiy, but I made some changes and added the EEND() stuff, so blame any problems on me. Submitted by: Stepan Dyatkovskiy <stpworld@narod.ru>
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/arm/divsi3.S20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/libkern/arm/divsi3.S b/sys/libkern/arm/divsi3.S
index 302f179..46e7c63 100644
--- a/sys/libkern/arm/divsi3.S
+++ b/sys/libkern/arm/divsi3.S
@@ -51,11 +51,11 @@ ENTRY_NP(__modsi3)
RET
END(__modsi3)
+ENTRY_NP(__udivsi3)
#ifdef __ARM_EABI__
-ENTRY_NP(__aeabi_uidiv)
-ENTRY_NP(__aeabi_uidivmod)
+EENTRY_NP(__aeabi_uidiv)
+EENTRY_NP(__aeabi_uidivmod)
#endif
-ENTRY_NP(__udivsi3)
.L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */
eor r0, r1, r0
eor r1, r0, r1
@@ -77,16 +77,16 @@ ENTRY_NP(__udivsi3)
mov r1, #0
RET
#ifdef __ARM_EABI__
-END(__aeabi_uidiv)
-END(__aeabi_uidivmod)
+EEND(__aeabi_uidiv)
+EEND(__aeabi_uidivmod)
#endif
END(__udivsi3)
+ENTRY_NP(__divsi3)
#ifdef __ARM_EABI__
-ENTRY_NP(__aeabi_idiv)
-ENTRY_NP(__aeabi_idivmod)
+EENTRY_NP(__aeabi_idiv)
+EENTRY_NP(__aeabi_idivmod)
#endif
-ENTRY_NP(__divsi3)
.L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */
eor r0, r1, r0
eor r1, r0, r1
@@ -401,8 +401,8 @@ ENTRY_NP(__divsi3)
mov r0, r3
RET
#ifdef __ARM_EABI__
-END(__aeabi_idiv)
-END(__aeabi_idivmod)
+EEND(__aeabi_idiv)
+EEND(__aeabi_idivmod)
#endif
END(__divsi3)
OpenPOWER on IntegriCloud