Fix the generation of CallerSaves; fixes #7163
authorIan Lynagh <ian@well-typed.com>
Tue, 21 Aug 2012 15:41:30 +0000 (16:41 +0100)
committerIan Lynagh <ian@well-typed.com>
Tue, 21 Aug 2012 15:44:51 +0000 (16:44 +0100)
commit6d3fb1b1efee263f07da47693147990e8443ab1d
treef61678c3b8da7ad81a3c8a110e52305cf821b7fc
parentd4ac7d8160b3533c7d0a2377b5442038f69486a8
Fix the generation of CallerSaves; fixes #7163

Simon Marlow spotted that we were #include'ing MachRegs.h several times,
but that doesn't work as (a) it uses ifdeffery to avoid being included
multiple times, and (b) even if we work around that, then the #define's
from previous inclusions are still defined when we #include it again.

So we now put the platform code for each platform in a separate .hs file.
13 files changed:
compiler/codeGen/CallerSaves.hs [deleted file]
compiler/codeGen/CgUtils.hs
compiler/codeGen/CodeGen/CallerSaves.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/ARM.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/NoRegs.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/PPC.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/PPC_Darwin.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/SPARC.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/X86.hs [new file with mode: 0644]
compiler/codeGen/CodeGen/Platform/X86_64.hs [new file with mode: 0644]
compiler/codeGen/StgCmmUtils.hs
compiler/ghc.cabal.in
includes/CallerSaves.part.hs