[llvm-branch-commits] [llvm] CodeGen: Remove UsesMSVCFloatingPoint from MachineModuleInfo (PR #100368)
Saleem Abdulrasool via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 24 09:28:05 PDT 2024
compnerd wrote:
Not entirely - `_fltused` indicates that any floating point operations are being used. The problem is that the kernel mode code does not permit floating point operations (though you can explicitly use `KeSaveFloatingPointState` and `KeRestoreFloatingPointState` to explicitly use floating point code in a region). The `_fltused` is a protection mechanism for that, with the user space C++ runtime ("ABI library" - a la libc++abi) support library (vcruntime) providing a default definition of the symbol. That way, if the user accidentally uses floating point code in the kernel, it is identified at link time and prevents the errant use. Doing this post legalization makes sense though.
https://github.com/llvm/llvm-project/pull/100368
More information about the llvm-branch-commits
mailing list