4 ms·
No, it's not true. Just a common misconception because people believe it's some sort of emulation.
by herpderperator 5y ago
No, it's not true. Just a common misconception because people believe it's some sort of emulation.
- dan-robertson 5y agoSome cross-compilation may need some emulation to fold constant expressions. For example if you want to write code using 80 bit floats for x86 and cross-compile on a platform that doesn’t have them, they must be emulated in software. The cost of this feels small but one way to make it more expensive would be also emulating regular double precision floating point arithmetic when cross compiling. Obviously some programs have more constant folding to do during compilation than others.
- messe 5y agoIs constant folding going to be a bottle neck? In this particular instance, in the kernel, floating point is going to be fairly rare anyway, and integer constant folding is going to be more or less identical on 64-bit x86 and ARM.
- mastax 5y agoMy understanding is that LLVM already does software emulation of floating point for const evaluation, in order to eliminate any variation due to the host architecture. https://llvm.org/doxygen/structllvm_1_1APFloatBase.html https://llvm.org/doxygen/structllvm_1_1APFloatBase.html