Commit 622c3cfe authored by Ian Lynagh's avatar Ian Lynagh
Browse files

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.
parent 94d7c806
This diff is collapsed.
......@@ -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
......
module SPARC.ShortcutJump (
JumpDest(..),
JumpDest(..), getJumpDestBlockId,
canShortcut,
shortcutJump,
shortcutStatic,
......@@ -25,6 +25,10 @@ data JumpDest
= DestBlockId BlockId
| DestImm Imm
getJumpDestBlockId :: JumpDest -> Maybe BlockId
getJumpDestBlockId (DestBlockId bid) = Just bid
getJumpDestBlockId _ = Nothing
canShortcut :: Instr -> Maybe JumpDest
canShortcut _ = Nothing
......
......@@ -781,6 +781,9 @@ is_G_instr instr
data JumpDest = DestBlockId BlockId | DestImm Imm
getJumpDestBlockId :: JumpDest -> Maybe BlockId
getJumpDestBlockId (DestBlockId bid) = Just bid
getJumpDestBlockId _ = Nothing
canShortcut :: Instr -> Maybe JumpDest
canShortcut (JXX ALWAYS id) = Just (DestBlockId id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment