Working of __asm__ __volatile__ (“” : : : “memory”)

后端 未结 4 1113
生来不讨喜
生来不讨喜 2020-11-28 03:24

What basically __asm__ __volatile__ () does and what is significance of \"memory\" for ARM architecture?

4条回答
  •  迷失自我
    2020-11-28 04:10

    The meaning is explained here:

    http://en.wikipedia.org/wiki/Memory_ordering

    Basically it implies that the assembly code will be executed where you expect it. It tells the compiler to not reorder instructions around it. That is what is coded before this piece of code will be executed before and what is coded after will be executed after.

提交回复
热议问题