Deutsch   English   Français   Italiano  
<2024Sep6.091643@mips.complang.tuwien.ac.at>

View for Bookmarking (what is this?)
Look up another Usenet article

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: Fri, 06 Sep 2024 07:16:43 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 29
Message-ID: <2024Sep6.091643@mips.complang.tuwien.ac.at>
References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <vat5ap$jthk$2@dont-email.me> <vaunhb$vckc$1@dont-email.me> <vautmu$vr5r$1@dont-email.me> <2024Aug31.170347@mips.complang.tuwien.ac.at> <vavpnh$13tj0$2@dont-email.me> <vb2hir$1ju7q$1@dont-email.me> <8lcadjhnlcj5se1hrmo232viiccjk5alu4@4ax.com> <vb4amr$2rcbt$1@dont-email.me> <2024Sep5.133102@mips.complang.tuwien.ac.at> <vbchiv$cde4$1@dont-email.me> <2024Sep5.174939@mips.complang.tuwien.ac.at> <vbd2tt$e0ld$1@dont-email.me>
Injection-Date: Fri, 06 Sep 2024 09:25:07 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2e85e44354343afe68fe387c30e9d02d";
	logging-data="786256"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18/q4FFsik/LZybGtSRpUo2"
Cancel-Lock: sha1:yO731gmSKDl1WrW6ZMbjRLVPjRk=
X-newsreader: xrn 10.11
Bytes: 2546

Bernd Linsel <bl1-thispartdoesnotbelonghere@gmx.com> writes:
>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.

We are using asm statements that result in no machine code for various
purposes (including the workaround for the code duplication of gcc-7
ff.)

We have not tried it for suppressing the basic block reordering, and I
would not expect such a statement to suppress that, because asm
volatile("") acts as a data-flow barrier, and basic-block reordering
has nothing to do with data flow.

- anton
-- 
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>