diff options
| author | Austin Clements <amdragon@mit.edu> | 2011-09-01 10:41:21 -0400 | 
|---|---|---|
| committer | Austin Clements <amdragon@mit.edu> | 2011-09-01 10:41:27 -0400 | 
| commit | d0f3efca650eccd5179e045cd07f7d723037defc (patch) | |
| tree | f28734b5ac99749ebb0927e079a4c656f6e0d847 /x86.h | |
| parent | e25b74ca8069e340c3f2c267d09beed6d9328250 (diff) | |
| download | xv6-labs-d0f3efca650eccd5179e045cd07f7d723037defc.tar.gz xv6-labs-d0f3efca650eccd5179e045cd07f7d723037defc.tar.bz2 xv6-labs-d0f3efca650eccd5179e045cd07f7d723037defc.zip  | |
Use stosl in memset; makes boot time bearable
Diffstat (limited to 'x86.h')
| -rw-r--r-- | x86.h | 9 | 
1 files changed, 9 insertions, 0 deletions
@@ -48,6 +48,15 @@ stosb(void *addr, int data, int cnt)                 "memory", "cc");  } +static inline void +stosl(void *addr, int data, int cnt) +{ +  asm volatile("cld; rep stosl" : +               "=D" (addr), "=c" (cnt) : +               "0" (addr), "1" (cnt), "a" (data) : +               "memory", "cc"); +} +  struct segdesc;  static inline void  | 
