[GHC] #12134: PowerPC 64-bit: Foreign functions with more than 8 float parameters broken

GHC ghc-devs at haskell.org
Thu Aug 25 15:04:16 UTC 2016


#12134: PowerPC 64-bit: Foreign functions with more than 8 float parameters broken
-------------------------------------+-------------------------------------
        Reporter:  trommler          |                Owner:  trommler
            Type:  bug               |               Status:  merge
        Priority:  normal            |            Milestone:  8.0.2
       Component:  Compiler (NCG)    |              Version:  8.0.1
      Resolution:                    |             Keywords:  ccall
Operating System:  Linux             |         Architecture:  powerpc64
 Type of failure:  Incorrect result  |            Test Case:
  at runtime                         |  ffi/should_run/T12134
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2327
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"7f373fb1b9aea45db94f04267427c5629b73f25c/ghc"
 7f373fb1/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="7f373fb1b9aea45db94f04267427c5629b73f25c"
 PPC NCG: Fix float parameter passing on 64-bit.

 On Linux 64-bit PowerPC the first 13 floating point parameters are
 passed in registers. We only passed the first 8 floating point params.

 The alignment of a floating point single precision value in ELF v1.9 is
 the second word of a doubleword. For ELF v2 we support only little
 endian and the least significant word of a doubleword is the first word,
 so no special handling is required.

 Add a regression test.

 Test Plan: validate on powerpc Linux and AIX

 Reviewers: erikd, hvr, austin, simonmar, bgamari

 Reviewed By: simonmar

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D2327

 GHC Trac Issues: #12134

 (cherry picked from commit 2897be77123bf31cad1c60dd5560eba7f2f021ce)
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12134#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list