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:
parent
8170d9569d
commit
c0ead7b5a8
|
@ -34,6 +34,7 @@ import qualified AST as A
|
|||
import Errors (Die, dieP, ErrorReport, Warn, WarningType(..), warnP, WarningReport)
|
||||
import Metadata
|
||||
import OrdAST ()
|
||||
import TypeSizes
|
||||
import UnifyType
|
||||
import Utils
|
||||
|
||||
|
@ -179,7 +180,11 @@ emptyState = CompState {
|
|||
|
||||
csCurrentFile = "none",
|
||||
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 = [],
|
||||
csMainLocals = [],
|
||||
|
|
Loading…
Reference in New Issue
Block a user