diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-12 16:32:34 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-12 16:32:34 +0100 |
commit | 2b7319a67de0771d31626091e43dd3b60827a0ea (patch) | |
tree | cb1542cb4e9e7e6826e06f2fb94fd590dca2f834 /compiler/nativeGen/SPARC/CodeGen.hs | |
parent | 44b5f471a314d964948c38684ce74b7a87df4ed8 (diff) | |
download | haskell-2b7319a67de0771d31626091e43dd3b60827a0ea.tar.gz |
Pass DynFlags down to wordWidth
Diffstat (limited to 'compiler/nativeGen/SPARC/CodeGen.hs')
-rw-r--r-- | compiler/nativeGen/SPARC/CodeGen.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs index 27dafb7d42..9d6aeaafc9 100644 --- a/compiler/nativeGen/SPARC/CodeGen.hs +++ b/compiler/nativeGen/SPARC/CodeGen.hs @@ -165,9 +165,9 @@ temporary, then do the other computation, and then use the temporary: -- | Convert a BlockId to some CmmStatic data -jumpTableEntry :: Maybe BlockId -> CmmStatic -jumpTableEntry Nothing = CmmStaticLit (CmmInt 0 wordWidth) -jumpTableEntry (Just blockid) = CmmStaticLit (CmmLabel blockLabel) +jumpTableEntry :: DynFlags -> Maybe BlockId -> CmmStatic +jumpTableEntry dflags Nothing = CmmStaticLit (CmmInt 0 (wordWidth dflags)) +jumpTableEntry _ (Just blockid) = CmmStaticLit (CmmLabel blockLabel) where blockLabel = mkAsmTempLabel (getUnique blockid) @@ -324,8 +324,8 @@ genSwitch dflags expr ids generateJumpTableForInstr :: DynFlags -> Instr -> Maybe (NatCmmDecl CmmStatics Instr) -generateJumpTableForInstr _ (JMP_TBL _ ids label) = - let jumpTable = map jumpTableEntry ids +generateJumpTableForInstr dflags (JMP_TBL _ ids label) = + let jumpTable = map (jumpTableEntry dflags) ids in Just (CmmData ReadOnlyData (Statics label jumpTable)) generateJumpTableForInstr _ _ = Nothing |