/* * ISO C memset - set a memory block to a byte value. This function uses fast * string to get better performance than the original function. The code is * simpler and shorter than the original function as well. * * rdi destination * rsi value (char) * rdx count (bytes) * * rax original destination * * The FSRS alternative should be done inline (avoiding the call and * the disgusting return handling), but that would require some help * from the compiler for better calling conventions. * * The 'rep stosb' itself is small enough to replace the call, but all * the register moves blow up the code. And two of them are "needed" * only for the return value that is the same as the source input, * which the compiler could/should do much better anyway.
*/
SYM_TYPED_FUNC_START(__memset)
ALTERNATIVE "jmp memset_orig", "", X86_FEATURE_FSRS
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.