Update all debug directives.
The libcorkscrew stack unwinder does not understand cfi directives,
so add .save directives so that it can function properly.
Also add the directives in to strcmp.S and fix a missing set of
directives in cortex-a9/memcpy_base.S.
Bug: 10345269
Merge from internal master.
(cherry-picked from 5f7ccea3ffab05aeceecb85c821003cf580630d3)
Change-Id: If48a216203216a643807f5d61906015984987189
diff --git a/libc/arch-arm/cortex-a15/bionic/strcmp.S b/libc/arch-arm/cortex-a15/bionic/strcmp.S
index 7aff7c4..2719bf7 100644
--- a/libc/arch-arm/cortex-a15/bionic/strcmp.S
+++ b/libc/arch-arm/cortex-a15/bionic/strcmp.S
@@ -122,9 +122,15 @@
.macro init
/* Macro to save temporary registers and prepare magic values. */
+ .save {r4-r7}
subs sp, sp, #16
+ .cfi_def_cfa_offset 16
strd r4, r5, [sp, #8]
+ .cfi_rel_offset r4, 0
+ .cfi_rel_offset r5, 4
strd r6, r7, [sp]
+ .cfi_rel_offset r6, 8
+ .cfi_rel_offset r7, 12
mvn r6, #0 /* all F */
mov r7, #0 /* all 0 */
.endm /* init */
@@ -165,6 +171,7 @@
#endif /* not __ARMEB__ */
.endm /* setup_return */
+ .cfi_startproc
pld [r0, #0]
pld [r1, #0]
@@ -348,7 +355,13 @@
/* Restore temporaries early, before computing the return value. */
ldrd r6, r7, [sp]
ldrd r4, r5, [sp, #8]
+ .pad #-16
adds sp, sp, #16
+ .cfi_def_cfa_offset 0
+ .cfi_restore r4
+ .cfi_restore r5
+ .cfi_restore r6
+ .cfi_restore r7
/* There is a zero or a different byte between r1 and r2. */
/* r0 contains a mask of all-zero bytes in r1. */
@@ -374,4 +387,5 @@
it ls
sbcls r0, r0, r0
bx lr
+ .cfi_endproc
END(strcmp)