[haiku-commits] haiku: hrev44285 - src/system/kernel/arch/x86

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 3 Jul 2012 02:19:32 +0200 (CEST)

hrev44285 adds 1 changeset to branch 'master'
old head: 29291c8c924ada62bf015aaf70d04616cc2e7314
new head: 7f7b659ec5eb4911c6a62e86af3a379227c3eeb0

----------------------------------------------------------------------------

7f7b659: Use safer but slower approach to copying the string.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44285
Commit:      7f7b659ec5eb4911c6a62e86af3a379227c3eeb0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7f7b659
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Jul  3 00:17:03 2012 UTC

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 3 deletions(-)
src/system/kernel/arch/x86/arch_x86.S |    7 ++++---

----------------------------------------------------------------------------

diff --git a/src/system/kernel/arch/x86/arch_x86.S 
b/src/system/kernel/arch/x86/arch_x86.S
index d5c5150..1ebcae0 100644
--- a/src/system/kernel/arch/x86/arch_x86.S
+++ b/src/system/kernel/arch/x86/arch_x86.S
@@ -286,9 +286,10 @@ FUNCTION(arch_cpu_user_strlcpy):
        cld
 .L_user_strlcpy_copy_loop:
        /* move data by bytes */
-       movsb
-       cmpb $0,-1(%esi)
-       je .L_user_strlcpy_source_done
+       lodsb
+       stosb
+       test %al,%al
+       jz .L_user_strlcpy_source_done
        loop .L_user_strlcpy_copy_loop
 
        /* null terminate string */


Other related posts:

  • » [haiku-commits] haiku: hrev44285 - src/system/kernel/arch/x86 - anevilyak