Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Bernd Linsel Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Thu, 5 Sep 2024 22:05:17 +0200 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <2024Aug30.195831@mips.complang.tuwien.ac.at> <2024Aug31.170347@mips.complang.tuwien.ac.at> <8lcadjhnlcj5se1hrmo232viiccjk5alu4@4ax.com> <2024Sep5.133102@mips.complang.tuwien.ac.at> <2024Sep5.174939@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 05 Sep 2024 22:05:17 +0200 (CEST) Injection-Info: dont-email.me; posting-host="518fd0342dd77f932c440d1090ec85af"; logging-data="459437"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VyFmQVkbBU1EKv2VlODOO" User-Agent: Betterbird (Linux) Cancel-Lock: sha1:N5QhCRK5m8dBE9rsTmTN9ll3NbA= In-Reply-To: <2024Sep5.174939@mips.complang.tuwien.ac.at> Content-Language: en-US Bytes: 2301 On 05.09.24 17:49, Anton Ertl wrote: > > Nobody said that gcc did anything wrong here. We were, however, > surprised that -fno-reorder-blocks did not suppress the reordering; we > reported this as bug, but were told that this option does something > different from what it says. Anyway, we developed a workaround. And > we also developed a workaround for the code duplication problem that > showed up in gcc-7. > Have you tried interspersing `asm volatile("")` statements? It is very often an effective means to prevent gcc from reordering code from before and after the asm statement. If you additional specify inputs, e.g. `asm volatile("" :: "r" (foo))`, you can force gcc to keep `foo` alive up to this point. -- Bernd Linsel