4 ms·
Hardware designers are aware of this thou, if you take say register-register movs, this can be achieved without actually copying the data, via register renaming
by rdc12 11y ago
Hardware designers are aware of this thou, if you take say register-register movs, this can be achieved without actually copying the data, via register renaming.
X86_64 ABI switched to being able to pass arguments in registers as well. And the top of the stack will almost certainly be in cache anyway for the old style.
- pmalynin 11y agoPlus, most instructions are actually out-of-order on x86 (hence the out-of-order superscalar). So your "mov" will usually take (effectively) zero cycles -- unless there is a dependency. But compilers are usually smart enough to pipeline the generated code, so the problem is really not a problem at all!
- TheLoneWolfling 11y agoDon't forget that reg->reg movs still take up instruction bandwidth and require decoding. They are nowhere near as expensive as a naive analysis would suggest - but they are nowhere near a free lunch either.