RFR(m): 8220351: Cross-modifying code

Andrew Haley aph at redhat.com
Tue Mar 19 17:08:51 UTC 2019


On 3/19/19 4:52 PM, Doerr, Martin wrote:
> Not sure if the inline assembler code on x86 necessarily needs a "clobber memory" effect.
> I don't know what a C++ compiler is allowed to do if it doesn't know that the code has some kind of memory effect.

Leave the memory clobber. No memory clobber means that you are telling the
compiler that this operation has no memory effect, which means that the
compiler can move the asm *before* you wrote out the changes to memory.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list