#2016: GHC generates bad code for pointer manipulations from .cmm
----------------------+-----------------------------------------------------
 Reporter:  wb.kloke  |          Owner:                
     Type:  bug       |         Status:  closed        
 Priority:  normal    |      Milestone:                
Component:  Compiler  |        Version:  6.8.2         
 Severity:  major     |     Resolution:  duplicate     
 Keywords:            |     Difficulty:  Unknown       
 Testcase:            |   Architecture:  x86_64 (amd64)
       Os:  FreeBSD   |  
----------------------+-----------------------------------------------------
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => duplicate

Comment:

 I strongly suspect you are experiencing another symptom of #1989.  The
 code is compiled correctly for me:

 {{{
 ~/builds/testing/rts > make StgStdThunks.s HC=../compiler/stage2/ghc-
 inplace
 ../compiler/stage2/ghc-inplace -Werror -H64m -Onot -fasm -optc-O2
 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts
 -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint     -S
 StgStdThunks.cmm -o StgStdThunks.s
 ~/builds/testing/rts > head -50 StgStdThunks.s
 .text
         .align 8
         .quad   0
         .quad   34
 .globl stg_sel_ret_0_upd_info
 .type stg_sel_ret_0_upd_info, @object
 stg_sel_ret_0_upd_info:
 .Lcg:
         movq %rbx,%rax
         andq $-8,%rax
         movq 8(%rax),%rbx
         addq $8,%rbp
 .Lc3:
         testq $7,%rbx
         jne .Lce
 .Lcd:
         movq (%rbx),%rax
         movslq -8(%rax),%rcx
         jmp *.Lnea(,%rcx,8)
 .Lcb:
         movq 8(%rbx),%rbx
         jmp .Lc3
 .Lca:
         jmp *(%rbp)
 .Lcc:
         jmp *%rax
 .Lce:
         jmp *(%rbp)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2016#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to