* sysdeps/arm/memset.S (memset): Correct handling of negative
authorDaniel Jacobowitz <dan@codesourcery.com>
Mon, 10 Oct 2005 15:00:47 +0000 (15:00 +0000)
committerDaniel Jacobowitz <dan@codesourcery.com>
Mon, 10 Oct 2005 15:00:47 +0000 (15:00 +0000)
arguments.

ChangeLog.arm
sysdeps/arm/memset.S

index f2a8a84..1615689 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * sysdeps/arm/memset.S (memset): Correct handling of negative
+       arguments.
+
 2005-10-10  Philip Blundell  <philb@gnu.org>
 
        * sysdeps/arm/_mcount.S: Suppress profiling when building this
index 1e2699d..b37451b 100644 (file)
@@ -32,6 +32,7 @@ ENTRY(memset)
        subne   r2, r2, #1
        bne     1b
 
+       and     r1, r1, #255    @ clear any sign bits
        orr     r1, r1, r1, lsl $8
        orr     r1, r1, r1, lsl $16