This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Rewritten v9/64-bit sparc strcmp.


From: Aurelien Jarno <aurelien@aurel32.net>
Date: Wed, 30 Apr 2014 18:09:33 +0200

> That said as the patch needs to test the mask byte by byte, I do wonder
> if overall it wont be easier to directly test byte by byte the string
> word loaded in the register. My SPARC assembly knowledge is relatively
> limited, so I am not sure it is actually the case.

There is also the possibility to do divide-and-conquer, for example
determining that the low 32-bits have not bits set and then just
checking the high 32-bits.

But all such schemes add branches, and the whole idea of this code
is for it to be straight line and branchless, thus avoiding thread
switching on Niagara.

Anyways, thanks for testing I'll get this fix merged.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]