projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d578649
)
Optimize filesys_stub_get_bytes().
author
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 26 Aug 2004 19:01:02 +0000
(19:01 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 26 Aug 2004 19:01:02 +0000
(19:01 +0000)
src/filesys/filesys-stub.c
patch
|
blob
|
history
diff --git
a/src/filesys/filesys-stub.c
b/src/filesys/filesys-stub.c
index 29c4cb995cc3a40cf25f789a99f743dd0bb27b0d..edf5de21f25af77d85d424b926fb6a5e91962b4c 100644
(file)
--- a/
src/filesys/filesys-stub.c
+++ b/
src/filesys/filesys-stub.c
@@
-84,7
+84,11
@@
filesys_stub_get_bool (void)
void
filesys_stub_get_bytes (void *buffer, size_t size)
{
- backdoor_get_bytes (buffer, size, in_byte, NULL);
+ /* We could use backdoor_get_bytes() but this is significantly
+ faster. */
+ asm ("rep insl; movl %0, %%ecx; rep insb"
+ :
+ : "g" (size % 4), "d" (0x8901), "c" (size / 4), "D" (buffer));
}
struct file *