#5422: Panic when using lots of registers in cmm code
---------------------------------+------------------------------------------
Reporter: pumpkin | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.2.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonmar):
In the beginning there were 8 registers, and That Was Enough For Everyone.
Then, I needed to sneak some information from compiled code into the RTS
and the easiest way to do that was to add a register. This happened a few
more times. So compiled code only uses 8 registers at most; certain
special sequences that interact with the RTS need to pass information in
the higher registers.
Now, primops have a fixed calling convention that puts all arguments in
the R registers. This is so that we can write the primop code once and
for all without worrying about platform-dependent calling conventions.
Fortunately there aren't any primops with more than 8 arguments, so that's
ok.
Eventually primops will use the same calling convention as other Haskell
functions, but this will have to wait until the new code generator is
fully working and we can ditch the old one and rewrite the RTS primop
code.
So, I presume you want to write a primop with more than 8 arguments?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5422#comment:4>
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