Changes between Version 17 and Version 18 of Commentary/Compiler/CmmType
- Timestamp:
- 10/20/09 15:40:54 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/CmmType
v17 v18 322 322 `GlobalRegs` are a very special case in Cmm, partly because they must conform to the STG register convention and the target C calling convention. That the Cmm parser recognises `R1` and `F3` as `GlobalRegs` is only the first step. The main files to look at for more information on this delicate topic are: 323 323 * [[GhcFile(compiler/codeGen/CgCallConv.hs)]] (the section on "Register assignment") 324 * [[GhcFile(includes/ Regs.h)]] (defining STG registers)325 * [[GhcFile(includes/ MachRegs.h)]] (target-specific mapping of machine registers for ''registerised'' builds of GHC)324 * [[GhcFile(includes/stg/Regs.h)]] (defining STG registers) 325 * [[GhcFile(includes/stg/MachRegs.h)]] (target-specific mapping of machine registers for ''registerised'' builds of GHC) 326 326 * [[GhcFile(rts/PrimOps.cmm)]] (examples of `GlobalReg` register usage for out-of-line primops) 327 327 All arguments to out-of-line !PrimOps in [[GhcFile(rts/PrimOps.cmm)]] are STG registers. … … 626 626 This is essentially a custom-coded version of the GNU Assembler (`as`) `.machine` directive, which is essentially the same as passing the `-arch [cpu_type]` option to `as`. 627 627 628 Cmm does not support the `target` directive. This is partly due GHC generally lacking cross-compiler capabilities. Should GHC move toward adding cross-compilation capabilities, the `target` might not be a bad thing to add. Target architecture parameters are currently handled through the [wiki: Building/BuildSystem Build System], which partly sets such architectural parameters through [[GhcFile(includes/mkDerivedConstants.c)]] and [[GhcFile(includes/ghcconfig.h)]].628 Cmm does not support the `target` directive. This is partly due GHC generally lacking cross-compiler capabilities. Should GHC move toward adding cross-compilation capabilities, the `target` might not be a bad thing to add. Target architecture parameters are currently handled through the [wiki:Attic/Building/BuildSystem Build System], which partly sets such architectural parameters through [[GhcFile(includes/mkDerivedConstants.c)]] and [[GhcFile(includes/ghcconfig.h)]]. 629 629 630 630 === Expressions ===
