Browse Source

sh: Fix a sign extension bug in memset().

Minor sign-extension bug in SH-specific memset()..

Signed-off-by: Toshinobu Sugioka <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Toshinobu Sugioka 18 years ago
parent
commit
e7be853df7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      arch/sh/lib/memset.S

+ 1 - 0
arch/sh/lib/memset.S

@@ -29,6 +29,7 @@ ENTRY(memset)
 	bf/s	1b
 	bf/s	1b
 	 mov.b	r5,@-r4
 	 mov.b	r5,@-r4
 2:				! make VVVV
 2:				! make VVVV
+	extu.b	r5,r5
 	swap.b	r5,r0		!   V0
 	swap.b	r5,r0		!   V0
 	or	r0,r5		!   VV
 	or	r0,r5		!   VV
 	swap.w	r5,r0		! VV00
 	swap.w	r5,r0		! VV00