OSDN Git Service

Fix cfi directives for memmove/strlcpy.
authorChristopher Ferris <cferris@google.com>
Thu, 18 Feb 2016 03:17:02 +0000 (19:17 -0800)
committerChristopher Ferris <cferris@google.com>
Thu, 18 Feb 2016 18:50:08 +0000 (10:50 -0800)
Bug: 27227225

(cherry picked from commit 97b6e131fd85bb0ae321d9e5a8a613f5ee373cf4)

Change-Id: I9462340a478d9b699240703d8da5967000a33d08

libc/arch-x86/atom/string/ssse3-strcpy-atom.S
libc/arch-x86/silvermont/string/sse2-memmove-slm.S

index 30254ca..3690b0d 100644 (file)
@@ -3147,7 +3147,7 @@ L(ExitTail16):
 #endif
 
 #ifdef USE_AS_STRNCPY
-# ifndef USE_AS_STRCAT
+# if !defined(USE_AS_STRCAT) && !defined(USE_AS_STRLCPY)
        CFI_PUSH (%esi)
        CFI_PUSH (%edi)
 # endif
index b971f0b..6a8f067 100644 (file)
@@ -327,6 +327,9 @@ L(mm_len_9_16_bytes_forward):
        movq    %xmm1, -8(%edx, %ecx)
        jmp     L(mm_return)
 
+       CFI_POP (%edi)
+       CFI_POP (%esi)
+
 L(mm_recalc_len):
 /* Compute in %ecx how many bytes are left to copy after
        the main loop stops.  */