From 49515ccd946ed2df5bda9b8ce19ddd875a06269f Mon Sep 17 00:00:00 2001 From: mycroft Date: Fri, 23 Apr 1993 06:33:20 +0000 Subject: [PATCH] Make fillw faster in the usual case. --- sys/arch/i386/i386/locore.s | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index aa69bfa6591c..fbfb1a1fb1b1 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -468,8 +468,16 @@ _fillw: pushl %edi movl 8(%esp),%eax movl 12(%esp),%edi - movl 16(%esp),%ecx + movw %ax, %cx + rorl $16, %eax + movw %cx, %ax cld + movl 16(%esp),%ecx + shrl %ecx + rep + stosl + movl 16(%esp),%ecx + andl $1, %ecx rep stosw popl %edi