
#9125: int-to-float conversion broken on ARM -------------------------------------+------------------------------------- Reporter: Ansible | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.8.4 Component: Compiler | Version: 7.8.3 Resolution: | Keywords: Differential Revisions: | Operating System: Unknown/Multiple Architecture: arm | Type of failure: Incorrect result Difficulty: Unknown | at runtime Blocked By: | Test Case: Related Tickets: | Blocking: -------------------------------------+------------------------------------- Comment (by amurrayc): I'm still learning about Cmm and calling conventions &c. so forgive my stumblings. If I modify `stg_decodeFloatzuIntzh` so that the two temporary pointers are shifted by one word the function returns the correct value. That is {{{ reserve 2 = tmp { mp_tmp1 = tmp + WDS(1); mp_tmp_w = tmp; }}} becomes {{{ reserve 3 = tmp { mp_tmp1 = tmp + WDS(2); mp_tmp_w = tmp + WDS(1); }}} With this change everything seems to work correctly. I'm confused though. The pointer that was getting clobbered by the argument value was `tmp + WDS(1)` but now `mp_tmp_w` i.e. the exponent is fine. Anyway, I hope this give someone wiser a clue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9125#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler