X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FnativeGen%2FSPARC%2FInstr.hs;h=b21f9476ac3c6554ad12f09f809f6cce982c9966;hp=6c7af5b169d75f1a50d931fc3c653c29247f224b;hb=42222f95a101fb3647f8728302bbf1098b74e59e;hpb=5e048459a28b08601a203b25ae9ead6284e8198a diff --git a/compiler/nativeGen/SPARC/Instr.hs b/compiler/nativeGen/SPARC/Instr.hs index 6c7af5b..b21f947 100644 --- a/compiler/nativeGen/SPARC/Instr.hs +++ b/compiler/nativeGen/SPARC/Instr.hs @@ -16,6 +16,8 @@ module SPARC.Instr ( fpRelEA, moveSp, + isUnconditionalJump, + Instr(..), maxSpillSlots ) @@ -69,6 +71,17 @@ moveSp :: Int -> Instr moveSp n = ADD False False sp (RIImm (ImmInt (n * wordLength))) sp +-- | An instruction that will cause the one after it never to be exectuted +isUnconditionalJump :: Instr -> Bool +isUnconditionalJump ii + = case ii of + CALL{} -> True + JMP{} -> True + JMP_TBL{} -> True + BI ALWAYS _ _ -> True + BF ALWAYS _ _ -> True + _ -> False + -- | instance for sparc instruction set instance Instruction Instr where