Mercurial > ecos
comparison packages/hal/i386/arch/current/src/hal_misc.c @ 115:6ed91473a1cd ecos-sw-2000-08-21
Merge from eCos master repository on 2000-08-21-22:40:54-BST
| author | jlarmour |
|---|---|
| date | Fri, 25 Aug 2000 17:32:38 +0000 |
| parents | 435cced73e2f |
| children | ac086aa3217e |
comparison
equal
deleted
inserted
replaced
| 114:5ad2b71d525e | 115:6ed91473a1cd |
|---|---|
| 47 #include <cyg/infra/cyg_type.h> | 47 #include <cyg/infra/cyg_type.h> |
| 48 | 48 |
| 49 #include <cyg/hal/hal_arch.h> | 49 #include <cyg/hal/hal_arch.h> |
| 50 | 50 |
| 51 void hal_zero_bss(void) | 51 void hal_zero_bss(void) |
| 52 { extern char _end ; | 52 { extern char __bss_end ; |
| 53 extern char __bss_start ; | 53 extern char __bss_start ; |
| 54 | 54 |
| 55 asm( | 55 asm( |
| 56 "movl %0, %%ecx;" /* Get the address of _end */ | 56 "movl %0, %%ecx;" /* Get the address of _end */ |
| 57 "movl %1, %%edi;" /* Address of __bss_start */ | 57 "movl %1, %%edi;" /* Address of __bss_start */ |
| 60 "shr $2, %%ecx;" /* Divide by 4: we'll fill 32-bit words. */ | 60 "shr $2, %%ecx;" /* Divide by 4: we'll fill 32-bit words. */ |
| 61 "xorl %%eax, %%eax;" /* Store zeros. */ | 61 "xorl %%eax, %%eax;" /* Store zeros. */ |
| 62 "rep | 62 "rep |
| 63 stosl" /* Fill the region. */ | 63 stosl" /* Fill the region. */ |
| 64 : /* No outputs. */ | 64 : /* No outputs. */ |
| 65 : "g" (&_end), "g" (&__bss_start) | 65 : "g" (&__bss_end), "g" (&__bss_start) |
| 66 : "ecx", "edi", "eax" | 66 : "ecx", "edi", "eax" |
| 67 ); | 67 ); |
| 68 } | 68 } |
| 69 | 69 |
| 70 //--------------------------------------------------------------------------- | 70 //--------------------------------------------------------------------------- |
