Re: [RFC PATCH v1 2/5] tools/nolibc: x86-64: Use `rep stosb` for `memset()`

From: Alviro Iskandar Setiawan
Date: Wed Aug 30 2023 - 14:43:52 EST


On Wed, Aug 30, 2023 at 11:08 PM Ammar Faizi wrote:
> On Wed, Aug 30, 2023 at 05:51:52PM +0200, Willy Tarreau wrote:
> > xchg %eax, %esi 1
> > push %rdx 1
> > pop %rcx 1
> > push %rdi 1
> > rep movsb 2 [sic]
> > pop %rax 1
> > ret 1
> > ------------- Total: 8 bytes :-)

That's beautiful!

-- Viro