#1435: "Naughty" register error in Cmm
-------------------------------+--------------------------------------------
  Reporter:  Michael D. Adams  |          Owner:       
      Type:  bug               |         Status:  new  
  Priority:  normal            |      Milestone:       
 Component:  Compiler          |        Version:  6.7  
  Severity:  normal            |       Keywords:       
Difficulty:  Unknown           |             Os:  Linux
  Testcase:                    |   Architecture:  x86  
-------------------------------+--------------------------------------------
When experimenting with Cmm code, I found the following bug/trap.

 This Cmm code,
 {{{
 foo {
     bits8 x;
     x = 5;
     bits8[12] = x;
     R1 = x;
     jump bar;
 }
 }}}
 causes the following error
 {{{
 /tmp/ghc6613_0/ghc6613_0.s: Assembler messages:

 /tmp/ghc6613_0/ghc6613_0.s:7:0:
      Error: junk `naughty I386 byte register' after expression
 }}}

 The assembly that is produced is:
 {{{
 .text
         .align 4,0x90
 .globl foo
 foo:
         movl $5,%eax
         movb %al,12
         movb %al,very naughty I386 byte register
         jmp bar

 .section .note.GNU-stack,"",@progbits
 .ident "GHC 6.7.20070612"
 }}}

 Note the "very naughty I386 byte register" in there.

 I am not sure whether this kind of Cmm can be generated from Haskell code.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1435>
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