This is the mail archive of the
mailing list for the GCC project.
Re: GCC/GLIBC and non-temporal instructions
Sergey Oboguev <firstname.lastname@example.org> writes:
> Well, all these
> things in GCC sources -- do they ever get triggered or not?
Ah, you're quite right, I was not aware of that. The rule there appears
to be the compiler will issue an mfence if it decides to use any
non-temporal moves in a loop.
However, I don't see anything in the code which will avoid using
non-temporal moves, or a fence, if there are existing non-temporal moves
(via instrinsic functions) in the loop. This seems like it is at least
a documentation bug.
> Also, looking up in GLIBC sources I can see MOVNTxxx instructions terminated
> with SFENCE, but not prefixed with LFENCE. What could this possibly mean?
You would have to ask the glibc maintainers about that. I don't know
enough to speculate.