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/krait/bionic/strcmp.S b/libc/arch-arm/krait/bionic/strcmp.S
index d614b9d..f26aaf1 100644
--- a/libc/arch-arm/krait/bionic/strcmp.S
+++ b/libc/arch-arm/krait/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]
 
@@ -347,7 +354,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.  */
@@ -452,7 +465,13 @@
     /* Restore registers and stack. */
     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
 
 	bx	lr
 
@@ -471,7 +490,14 @@
     /* Restore registers and stack. */
     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
 
 	bx	lr
+    .cfi_endproc
 END(strcmp)