1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

UserspaceEmulator: Add a fast path for forward REP STOSB

This is used by memset() so we get a lot of mileage out of optimizing
this instruction.

Note that we currently audit every individual byte accessed separately.
This could be greatly improved by adding a range auditing mechanism to
MallocTracer.
This commit is contained in:
Andreas Kling 2020-11-15 17:54:11 +01:00
parent 92e152f11d
commit 102e1d330c
3 changed files with 45 additions and 0 deletions

View file

@ -108,6 +108,8 @@ public:
void set_tls_region(NonnullOwnPtr<Region>);
bool fast_fill_memory8(X86::LogicalAddress, size_t size, ValueWithShadow<u8>);
void copy_to_vm(FlatPtr destination, const void* source, size_t);
void copy_from_vm(void* destination, const FlatPtr source, size_t);
ByteBuffer copy_buffer_from_vm(const FlatPtr source, size_t);