4 ms·
Apparently, because it's shorter [0]. [0]: See https://lkml.org/lkml/2017/11/10/348 https://lkml.org/lkml/2017/11/10/348
by jicks 9y ago
Apparently, because it's shorter [0].
[0]: See https://lkml.org/lkml/2017/11/10/348 https://lkml.org/lkml/2017/11/10/348
- cwzwarich 9y agoWhy is it shorter? Both MOV and OR have one byte encodings, and with the OR you either have to use an immediate zero (which burns a byte) or materialize zero in some other way. As that email points out, the entire sequence would be shorter using a different addressing mode anyways. And a read-modify-write is definitely slower at runtime.
- simcop2387 9y agoI wonder if it's because it's safer in that it doesn't change anything there if you've gone over the stack limit and into the heap? I know that -fstack-protect was designed a long time ago, possible before guard pages and before 64bit addressing.