[PATCH] x86_64: Remove 9 REX bytes from memchr.S

H.J. Lu hjl.tools@gmail.com
Wed May 24 14:55:00 GMT 2017


On Sat, May 20, 2017 at 12:58 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Sat, May 20, 2017 at 7:59 AM, Zack Weinberg <zackw@panix.com> wrote:
>> On Sat, May 20, 2017 at 10:50 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>> There is no need to use 64-bit registers when only the lower 32 bits
>>> are non-zero.
>>
>> This code is used generically for x86-64, not for a specific
>> microarchitecture. Is there a reason why this will never cause partial
>> register stalls, now or in the future?
>
> By x86-64 specification, 32-bit destination registers in these instructions
> are zero-extended to 64 bits and there is register stall at all.
>

Here is the updated patch with one more REX byte removed.

Any other comments?


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86_64-Remove-redundant-REX-bytes-from-memchr.S.patch
Type: text/x-patch
Size: 2126 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170524/992c183b/attachment.bin>


More information about the Libc-alpha mailing list