Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Tue, 10 Sep 2024 08:33:45 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 30 Message-ID: <2024Sep10.103345@mips.complang.tuwien.ac.at> References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <86v7zep35n.fsf@linuxsc.com> <20240902180903.000035ee@yahoo.com> <20240903190928.00002f92@yahoo.com> <86seufo11j.fsf@linuxsc.com> <1246395e530759ac79805e45b3830d8f@www.novabbs.org> <8634m9lga1.fsf@linuxsc.com> <2024Sep9.090725@mips.complang.tuwien.ac.at> <20240909122657.000035a3@yahoo.com> Injection-Date: Tue, 10 Sep 2024 10:44:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f21f15281580639cd9bc25764f54f587"; logging-data="2997940"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lnym4zs+5JKleLu25OHR7" Cancel-Lock: sha1:AUvobIK1EX4I5HEi3gb78WnTZs4= X-newsreader: xrn 10.11 Bytes: 2561 Thomas Koenig writes: >Michael S schrieb: [on memcpy() where glibc used negative stride on some hardware and existing binaries no longer worked as intended] >> Does hardware on which negative stride is faster really exists? > >Depends on what the alterntive is. > >For a Fortran assignment > > a(n1:n2) = a(n3:n4) > >the semantics of the language demand that the RHS is evaluated >completely before the assignment. In the case of the wrong >kind of overlap, a negative stride can be used instead of >using an array temporary. Which is a completely different situation from the one that was assumed by Ulrich Drepper: that there is no overlap between the source and the target of memcpy(), and if there is, the programmer "should never have been allowed to touch a keyboard" (i.e., the user of the programmer's program deserves the breakage). So Ulrich Drepper considered himself free to use an arbitrary stride, with no language semantics limiting him. And he claimed that for some hardware, negative stride is faster. - anton -- 'Anyone trying for "industrial quality" ISA should avoid undefined behavior.' Mitch Alsup,