diff options
author | 2025-01-23 10:41:10 +0800 | |
---|---|---|
committer | 2025-01-23 10:41:10 +0800 | |
commit | e6f77b7ea3e38c9853bee60b275f3f89d252a5b3 (patch) | |
tree | 80bfbabed9d4cbcf9fa62677f78b34279d7e2f87 /src/include/asm/memory.h | |
download | linux-0.11-master.tar.gz linux-0.11-master.zip |
Diffstat (limited to 'src/include/asm/memory.h')
-rw-r--r-- | src/include/asm/memory.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/asm/memory.h b/src/include/asm/memory.h new file mode 100644 index 0000000..8aa6d52 --- /dev/null +++ b/src/include/asm/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * NOTE!!! memcpy(dest,src,n) assumes ds=es=normal data segment. This | ||
3 | * goes for all kernel functions (ds=es=kernel space, fs=local data, | ||
4 | * gs=null), as well as for all well-behaving user programs (ds=es= | ||
5 | * user data space). This is NOT a bug, as any user program that changes | ||
6 | * es deserves to die if it isn't careful. | ||
7 | */ | ||
8 | //#define memcpy(dest,src,n) ({ \ | ||
9 | //void * _res = dest; \ | ||
10 | //__asm__ __volatile__ ("cld;rep;movsb" \ | ||
11 | // ::"D" ((long)(_res)),"S" ((long)(src)),"c" ((long) (n)) \ | ||
12 | // ); \ | ||
13 | //_res; \ | ||
14 | //}) | ||