summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-05-29 19:06:28 +0100
committerIan Lynagh <igloo@earth.li>2011-05-29 19:16:37 +0100
commit622c3cfe2b3ebde891981544c0eea525eaa55e6f (patch)
treee1a2a42907b241dca3911d9e41b63a43d9a08004 /compiler/nativeGen/PPC
parent94d7c806e2b0f1640372142a89cac2e974f5c26b (diff)
downloadhaskell-622c3cfe2b3ebde891981544c0eea525eaa55e6f.tar.gz
Remove most of the CPP from AsmCodeGen
In particular, the "#error" for platforms without a NCG is gone, which means the module should now build on all platforms again. I'm not sure if this is the nicest way to handle multiple platforms here, but it works for now.
Diffstat (limited to 'compiler/nativeGen/PPC')
-rw-r--r--compiler/nativeGen/PPC/RegInfo.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/nativeGen/PPC/RegInfo.hs b/compiler/nativeGen/PPC/RegInfo.hs
index 91c9e15e62..bfc712af86 100644
--- a/compiler/nativeGen/PPC/RegInfo.hs
+++ b/compiler/nativeGen/PPC/RegInfo.hs
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------------
module PPC.RegInfo (
- JumpDest( DestBlockId ),
+ JumpDest( DestBlockId ), getJumpDestBlockId,
canShortcut,
shortcutJump,
@@ -31,6 +31,10 @@ import Unique
data JumpDest = DestBlockId BlockId | DestImm Imm
+getJumpDestBlockId :: JumpDest -> Maybe BlockId
+getJumpDestBlockId (DestBlockId bid) = Just bid
+getJumpDestBlockId _ = Nothing
+
canShortcut :: Instr -> Maybe JumpDest
canShortcut _ = Nothing