Avoid string instructions in x86_64 memset
We want to avoid revealing the sandbox base address in newlib code; memset
currently uses stos, (which leaves the full 64 bits in rdi) and does not clear
it before returning to user code. Instead of just clearing it, we remove
the stos instructions because if we want to implement a validator
check in the future, it will be easier to just ban them.
Also:
* Optimize the unrolled loop for large aligned buffers by using rbp
as a base register.
* Remove non-temporal store instructions (and the fence that separated them
from the subsequent stores).
R=jvoung@chromium.org, mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4088
Review URL: https://codereview.chromium.org/957063002
1 file changed