Skip to content

compiler: fix handling of MO_F_Neg in wasm NCG

Cheng Shao requested to merge type-dance/ghc:wasm-ncg-fix-fp-neg into master

In the wasm NCG, we used to compile MO_F_Neg to 0.0-x. It was an oversight, there actually exists f32.neg/f64.neg opcodes in the wasm spec and those should be used instead! The old behavior almost works, expect when GHC compiles the -0.0 literal, which will incorrectly become 0.0.

Merge request reports