Added some of the standard occam defines, such as TARGET.BITS.PER.WORD

For the moment, TARGET.HAS.FPU is left out, because a lot of occam libraries seem to do ASM if it's defined, and we can't handle ASM
This commit is contained in:
Neil Brown 2009-04-03 17:55:12 +00:00
parent 8170d9569d
commit c0ead7b5a8

View File

@ -34,6 +34,7 @@ import qualified AST as A
import Errors (Die, dieP, ErrorReport, Warn, WarningType(..), warnP, WarningReport) import Errors (Die, dieP, ErrorReport, Warn, WarningType(..), warnP, WarningReport)
import Metadata import Metadata
import OrdAST () import OrdAST ()
import TypeSizes
import UnifyType import UnifyType
import Utils import Utils
@ -179,7 +180,11 @@ emptyState = CompState {
csCurrentFile = "none", csCurrentFile = "none",
csUsedFiles = Set.empty, csUsedFiles = Set.empty,
csDefinitions = Map.insert "COMPILER.TOCK" PreprocNothing Map.empty, csDefinitions = Map.fromList [("COMPILER.TOCK", PreprocNothing)
,("TARGET.BITS.PER.WORD", PreprocInt $ show cIntSize)
,("TARGET.BYTES.PER.WORD", PreprocInt $ show $ cIntSize `div` 8)
-- ,("TARGET.HAS.FPU", PreprocNothing)
],
csLocalNames = [], csLocalNames = [],
csMainLocals = [], csMainLocals = [],