[GHC] #7902: Add support for byte endianness swapping exposed as a primops

GHC ghc-devs at haskell.org
Wed Jun 12 13:01:39 CEST 2013


#7902: Add support for byte endianness swapping exposed as a primops
------------------------------------------+---------------------------------
  Reporter:  tab                          |          Owner:                  
      Type:  feature request              |         Status:  new             
  Priority:  normal                       |      Milestone:                  
 Component:  Compiler                     |        Version:  7.7             
Resolution:                               |       Keywords:  bswap endianness
        Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown                 |     Difficulty:  Unknown         
  Testcase:  codeGen/should_run/cgrun072  |      Blockedby:                  
  Blocking:                               |        Related:                  
------------------------------------------+---------------------------------
Changes (by simonpj):

  * status:  closed => new
  * testcase:  => codeGen/should_run/cgrun072
  * resolution:  fixed =>


Comment:

 Urgh.  These patches caused #7976.  So I have reverted them:
 {{{
 commit 4aa7fc89fbdbe38d362e59c93fe8ec02185c8073
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Tue Jun 11 23:28:06 2013 +0100

     Comment out function; consequence of reverting a553f18

  compiler/llvmGen/LlvmCodeGen/CodeGen.hs |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 commit 91979ed2f0f01d8a3559c4e26d6662d6dd44b442
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Tue Jun 11 21:12:58 2013 +0100

     Revert "Add support for byte endian swapping for Word 16/32/64."

     This reverts commit 1c5b0511a89488f5280523569d45ee61c0d09ffa.

  compiler/cmm/CmmMachOp.hs               |    1 -
  compiler/cmm/PprC.hs                    |    1 -
  compiler/codeGen/StgCmmPrim.hs          |   12 -------
  compiler/llvmGen/LlvmCodeGen/CodeGen.hs |   60
 +++++++++++++------------------
  compiler/nativeGen/CPrim.hs             |    9 -----
  compiler/nativeGen/PPC/CodeGen.hs       |    1 -
  compiler/nativeGen/SPARC/CodeGen.hs     |    1 -
  compiler/nativeGen/X86/CodeGen.hs       |   14 --------
  compiler/nativeGen/X86/Instr.hs         |    3 --
  compiler/nativeGen/X86/Ppr.hs           |    1 -
  compiler/prelude/primops.txt.pp         |    9 -----
  11 files changed, 24 insertions(+), 88 deletions(-)
 }}}
 also in `base`:
 {{{
 commit 2f8c5bff9ccb762b34467e069f208f28538cc18e
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Tue Jun 11 21:50:04 2013 +0100

     Revert "expose new Word operation to swap endianness for
 Word{16,32,64}"

     This reverts commit 3ef0f91d4e9a3649581557ec4ba663db4306d7d5.

  Data/Word.hs |   18 ------------------
  GHC/Word.hs  |   18 +-----------------
  2 files changed, 1 insertion(+), 35 deletions(-)
 }}}
 Also `cgrun072` now breaks so I've made it "expect-broken" on this ticket.

 Maybe you can investigate, fix, and re-apply?

 Simon

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



More information about the ghc-tickets mailing list