This is a compiler barrier, not a complete hardware memory barrier. That is, it is assumed that this is an opaque call that the compiler cannot optimize, but it does not affect the hardware in terms of memory reordering 1 . It can be correctly defined for this purpose if the compilers in question really consider asm blocks as opaque (for example, gm asm blocks have specific rules for determining exactly what can change by block, etc.).
It might be appropriate to call it a complete memory barrier (which usually suppresses both the compiler and hardware reordering) if you know the hardware that this code target has a strong memory model that never restores memory operations.
1 Thus, such a barrier can still be sufficient if the program is single-threaded or the machine does not have interesting reorders (for example, a simple order is in order, a specific processor or a single-processor system).
source share