This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Improve i?86/x86-64 movmem (PR target/21329)
- From: Andi Kleen <ak at muc dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org,Denis Vlasenko <vda at port dot imtp dot ilyichevsk dot odessa dot ua>
- Date: Sat, 07 May 2005 16:02:13 +0200
- Subject: Re: [PATCH] Improve i?86/x86-64 movmem (PR target/21329)
- References: <20050506105814.GS17420@devserv.devel.redhat.com>
Jakub Jelinek <firstname.lastname@example.org> writes:
> For very small move sizes, say movl $2, %ecx; rep; movsl,
> doing instead movsl; movsl; is both shorter and faster (and decreases
> register preasure).
Actually movl ... ; movl ... would be even faster for very small
N. movsl has few cycles setup cost, which movl is ideally 1 cycle.
I believe that is true on the P4 too.
However movsl is probably smaller, so -Os might prefer that.