Generate assembly on x86_64 for word2float.

Open Benjamin Maurer requested to merge cptwunderlich/ghc:wip/bmaurer/word2float-asm into master

Generate assembly instructions for wordToFloat on x86_64 instead of issuing C-call. Very much inspired by what GCC does here.

Tracked in issue #22252

Instructions for source operands smaller than destination could be more efficient (e.g., 32-bit double word on x86_64), but since Haskell source only takes Word and primop is not available in Cmm (not in Parser.y), there is currently now way to generate this with a smaller source operand.

Note that there is a pre-existing test in testsuite/tests/codeGen/should_run/Word2Float[64|32].hs

Edited by Benjamin Maurer

Merge request reports