Sujet : Re: Computer architects leaving Intel...
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.archDate : 06. Sep 2024, 08:16:43
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Sep6.091643@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : xrn 10.11
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>