Fixes for non-temporal intrinsics#1929
Conversation
|
Can you add a comment explaining why inline asm is used here? |
|
Shouldn't the implementation of |
|
My understanding is that x86 memory model weirdness only applies to non-temporal stores, not non-temporal loads. |
|
SDM says
and
so it seems like this can be UB if some very specific conditions are met (I am not too good with memory types). Do we not support such things (like using different memory types for same chunk in different processors)? It still seems like the second condition (syncing with other agents) might be a vulnerability |
|
Memory type is an attribute that the OS sets for a range of physical memory. Normal memory uses the WB protocol which has the expected memory ordering semantics. Essentially we don't consider WC memory as normal memory for the Rust abstract machine, so the condition doesn't apply here. |
_mm_stream_{ss,sd}_mm_sfencecalls in tests, without it the tests are technically UB