From 3fef9a66b564aa8236698632111d61418725caff Mon Sep 17 00:00:00 2001 From: "Artem Jerdev (art_zh)" Date: Wed, 23 Jan 2013 00:06:59 +0000 Subject: [PATCH] SSE-moves git-svn-id: svn://kolibrios.org@3195 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/Kolibri-A/trunk/init.inc | 26 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/kernel/branches/Kolibri-A/trunk/init.inc b/kernel/branches/Kolibri-A/trunk/init.inc index c5180a2c1c..e50f3d4bcb 100644 --- a/kernel/branches/Kolibri-A/trunk/init.inc +++ b/kernel/branches/Kolibri-A/trunk/init.inc @@ -18,15 +18,25 @@ preinit_mem: ; clear [CLEAN_ZONE..HEAP_BASE] xor eax,eax - mov edi,CLEAN_ZONE ; 0x280000 = ramdisk FAT ? - mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4 - cld - rep stosd + movd xmm0, eax ; load 128-bit Zero -; clear [0x40000..0x90000] + mov edi,CLEAN_ZONE ; 0x280000 = ramdisk FAT ? +; mov ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 16 + cld +.1: + movups [edi],xmm0 + add edi, 16 + cmp edi, (HEAP_BASE-OS_BASE) + jb .1 + + +; clear [0x50000..0x90000] mov edi,0x50000 ; 0x50000 is somewhere inside kernel code? - mov ecx,(0x90000-0x50000)/4 - rep stosd +.2: + movups [edi],xmm0 + add edi, 16 + cmp edi, 0x90000 + jb .2 ; clear undefined kernel globals mov edi, endofcode-OS_BASE @@ -149,7 +159,7 @@ init_page_map: mov edi, sys_pgmap-OS_BASE mov ebx, ecx - shr ecx, 5 ; 32 pagebits per dw + shr ecx, 5 ; 32 pagebits per dw xor eax, eax rep stosd