[RFC] strcpy optimizations

David Miller davem@davemloft.net
Wed Jan 30 00:02:00 GMT 2013


From: Rich Felker <dalias@aerifal.cx>
Date: Tue, 29 Jan 2013 19:00:00 -0500

> On Tue, Jan 29, 2013 at 02:27:28PM -0800, Roland McGrath wrote:
>> It's certainly the case that strcpy et al must never write to any byte
>> of the address space that its user-visible semantics do not allow it to
>> change.  (On a machine where the smallest size of write is larger than a
>> byte, then of course it can write the whole smallest possible unit
>> containing a byte that it's supposed to write.)  Likewise, they must not
> 
> Such machines are not conforming(*) to the POSIX or C11 memory models;
> I don't think it's useful to support them, and in fact I don't think
> glibc supports any such machines anyway.
> 
> (*) Technically they could be made to conform, if EVERY single memory
> access were wrapper by the compiler with a machine-wide lock/unlock
> pair.

I think we still support the older Alpha's which don't have byte/half-word
loads and stores.



More information about the Libc-alpha mailing list