Use memory constraints instead of memory clobbers
The benefit is twofold. First, using "m"(x) instead of "r"(&x) allows the compiler to use displacement addressing instead of just register indirect, which can remove an ADDI. Second, the memory clobber is a heavy hammer that forces reloading unrelated variables from memory.
parent
56a137c8
Please register or sign in to comment