[remove last vestiges of old architecture specific code in favor of general ini files
John Meacham <john@repetae.net>**20090623010747
 Ignore-this: 607a5a57073aa5d9ffd39a4dafbb029a
] hunk ./C/Arch.hs 1
-{-# OPTIONS_GHC -cpp -fbang-patterns #-}
-module C.Arch(
-    stringToOpTy,
-    determineArch,
-    primitiveInfo
-    ) where
-
-
-
-{-
-    architecture specification consists of a string of form
-
-    backend-cpu-flags
-
-    where any of the fields may be omitted.
-
-    valid backends are currently "ghc" and "grin", valid cpus are listed in arch/ and 'generic', and flags consist of 32 and 64
-    for instance
-
-    grin-i686
-
-    there are only 2 ghc versions of the backend, ghc-32 and ghc-64.
-
--}
-
-import Char
-import Data.List
-import System.IO.Unsafe
-import System.Info
-import qualified Data.Map as Map
-
-import C.Prims
-import Options
-import Util.Gen
-import qualified FlagOpts as FO
-import qualified Cmm.Op as Op
-
-#include "../arch/generic.arch"
-#include "../arch/i686.arch"
-#include "../arch/x86_64.arch"
-
-#include "MachDeps.h"
-
-newtype ArchInfo = ArchInfo {
-    archPrimMap :: Map.Map ExtType PrimType
-}
-
-cpu_alias s = maybe arch_error id $ lookup s' $ [
-    ("unknown","generic"),
-    ("amd64","x86_64"),
-    ("i386","i686"),
-    ("i486","i686"),
-    ("i586","i686")
-    ] ++ [ (n,n) | n <- archs ] where s' = map toLower s
-
-archs = ["generic","i686","x86_64"]
-
-arch_map = [
-    ("generic",Nothing,arch_generic,[]),
-    ("i686",Nothing,arch_i686,[]),
-    ("x86_64",Just 64,arch_x86_64,[]),
-    ("x86_64",Just (32::Int),arch_i686,["-m32"])
-    ]
-
-available_archs = snub $ "ghc":"ghc-64":"ghc-32":[ n | (n,_,_,_) <- arch_map ]  ++ [ n ++ "-" ++ show b |  (n,Just b,_,_) <- arch_map]
-
--- get information on a primitive type if it is available
-archGetPrimInfo :: Monad m => ArchInfo -> ExtType -> m PrimType
-archGetPrimInfo ArchInfo { archPrimMap = pi } et = case Map.lookup et pi of
-    Nothing -> fail $ "archGetPrimInfo: No info for: " ++ et
-    Just s -> return s
-
-primitiveInfo :: Monad m => ExtType -> m PrimType
-primitiveInfo et = archGetPrimInfo archInfo et
-
-
-genericArchInfo = ArchInfo { archPrimMap = primMap }
-archInfo = ArchInfo { archPrimMap = genericPrimMap }
-
-primMap :: Map.Map ExtType PrimType
-primMap = Map.fromList [ (primTypeName a,a) | a <- as ] where
-    (_,_,as,_) = unsafePerformIO determineArch
-
-genericPrimMap :: Map.Map ExtType PrimType
-genericPrimMap = Map.fromList [ (primTypeName a,a) | a <- arch_generic ] where
-
-stringToOpTy ::  ExtType -> Op.Ty
-stringToOpTy s = case Op.readTy s of
-    Just t -> t
-    _ -> error $ "stringToOpTy: " ++ show s
-    
-
-
-determineArch = do
-    let specs = maybe [] (split (== '-')) (Just "") -- (optArch options)
-        (backendGhc,specs') | ("ghc":rs) <- specs = (True,rs)
-                            | ("grin":rs) <- specs = (False,rs)
-                            | ("fgrin":rs) <- specs = (False,rs)
-                            | otherwise = (fopts FO.ViaGhc,specs)
-        (cpu,bits) = case specs' of
-            ["32"] -> (cpu_alias arch,32)
-            ["64"] -> (cpu_alias arch,64)
-            [cpu,"32"] -> (cpu_alias cpu,32)
-            [cpu,"64"] -> (cpu_alias cpu,64)
-            [cpu]      -> (cpu_alias cpu,WORD_SIZE_IN_BITS)
-            []         -> (cpu_alias arch,WORD_SIZE_IN_BITS)
-            _          -> arch_error
-    let (fn,mp,opt) = case (backendGhc,cpu,bits) of
-            (True,!_,32) -> ("ghc-" ++ show bits,arch_i686,[])
-            (True,!_,64) -> ("ghc-" ++ show bits,arch_x86_64,[])
-            (_,"generic",_) -> ("generic",arch_generic,[])
-            (_,"i686",32)   -> ("i686",arch_i686,[])
-            (_,"x86_64",32) -> ("x86_64-32",arch_i686, ["-m32"])
-            (_,"x86_64",(64::Int)) -> ("x86_64",arch_x86_64,[])
-            _ -> arch_error
-
-    return (backendGhc,fn,mp,opt)
-
-arch_error =  error $ "\nunknown architecture, supported architectures are:\n" ++ show available_archs
-
-
-
-
-
rmfile ./C/Arch.hs
hunk ./C/FromGrin2.hs 18
-import C.Arch
hunk ./Cmm/Op.hs 181
+stringToOpTy ::  String -> Ty
+stringToOpTy s = case readTy s of
+    Just t -> t
+    _ -> error $ "stringToOpTy: " ++ show s
+
hunk ./E/PrimOpt.hs 13
-import C.Arch
hunk ./E/PrimOpt.hs 26
+import Cmm.Op(stringToOpTy)
hunk ./Grin/FromE.hs 15
-import C.Arch
hunk ./Main.hs 15
-import C.Arch
hunk ./Makefile.am 17
-HSFILES=C/Arch.hs C/Generate.hs CharIO.hs Cmm/Number.hs Cmm/OpEval.hs DerivingDrift/DataP.hs \
+HSFILES=C/Generate.hs CharIO.hs Cmm/Number.hs Cmm/OpEval.hs DerivingDrift/DataP.hs \
hunk ./arch/arch.c 1
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <stddef.h>
-#include <float.h>
-#include <wchar.h>
-#include <wctype.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/utsname.h>
-
-// #include "../data/HsFFI.h"
-typedef void *HsPtr;
-typedef void (*HsFunPtr)(void);
-
-#define SIGN(x) ((int)((x)(0 - 1) < 0) ? "True" : "False")
-#define FLOAT(x) ((int)(((x)0.1) != 0) ? "PrimTypeFloating" : "PrimTypeIntegral")
-
-#define ALIGN(x) (__alignof__ (x))
-#define SIZE(x) fprintf(FP, "  PrimType {\n    primTypeName = \"%s\",\n    primTypeIsSigned = %s,\n    primTypeType = %s,\n    primTypeAlignmentOf = %i,\n    primTypeSizeOf = %i },\n", #x , SIGN(x), FLOAT(x), ALIGN(x), sizeof(x))
-#define SIZEP(x) fprintf(FP, "  PrimType {\n    primTypeName = \"%s\",\n    primTypeIsSigned = %s,\n    primTypeType = PrimTypePointer,\n    primTypeAlignmentOf = %i,\n    primTypeSizeOf = %i },\n", #x , SIGN(x), ALIGN(x), sizeof(x))
-#define CONST(x) printf("const %19s  0x%llx\n", #x , (long long)x)
-
-
-int
-main(int argc, char *argv[])
-{
-        struct utsname utsname;
-        char *str;
-        FILE *FP;
-        uname(&utsname);
-
-        str = malloc(strlen(utsname.machine) + 20);
-        strcpy(str, utsname.machine);
-        strcat(str, ".arch");
-
-        //FP = fopen(str,"w");
-        FP = stdout;
-
-        fprintf(FP, "arch_%s = [\n", utsname.machine);
-
-        SIZE(uint32_t);
-        SIZE(int);
-        SIZE(intmax_t);
-        SIZE(int8_t);
-        SIZE(int16_t);
-        SIZE(int32_t);
-        SIZE(int64_t);
-        SIZE(intmax_t);
-        SIZE(intptr_t);
-        SIZE(unsigned int);
-        SIZE(uint8_t);
-        SIZE(uint16_t);
-        SIZE(uint32_t);
-        SIZE(uint64_t);
-        SIZE(uintmax_t);
-        SIZE(uintptr_t);
-        SIZE(float);
-        SIZE(double);
-        SIZE(long double);
-        SIZEP(HsPtr);
-        SIZEP(HsFunPtr);
-        SIZE(char);
-        SIZE(short);
-        SIZE(int);
-        SIZE(unsigned int);
-        SIZE(size_t);
-        SIZE(ssize_t);
-        SIZE(wchar_t);
-        SIZE(wint_t);
-        SIZE(ptrdiff_t);
-        SIZE(time_t);
-        SIZE(wctype_t);
-        SIZE(off_t);
-        fprintf(FP, "  PrimType {\n    primTypeName = \"void\",\n    primTypeIsSigned = False,\n    primTypeType = PrimTypeVoid,\n    primTypeAlignmentOf = 0,\n    primTypeSizeOf = 0 }\n  ]\n\n");
-
-        fclose(FP);
-
-        return 0;
-}
-
-
rmfile ./arch/arch.c
hunk ./arch/generic.arch 1
-arch_generic = [
-  PrimType {
-    primTypeName = "uint32_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "HsChar",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "int8_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "int16_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "int32_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "int64_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "uint8_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "uint16_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "uint32_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "uint64_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "char",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "void",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeVoid,
-    primTypeAlignmentOf = 0,
-    primTypeSizeOf = 0 }
-  ]
-
rmfile ./arch/generic.arch
hunk ./arch/i686.arch 1
-arch_i686 = [
-  PrimType {
-    primTypeName = "uint32_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "HsChar",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "int",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "intmax_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "int8_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "int16_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "int32_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "int64_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "intmax_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "intptr_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "unsigned int",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "uint8_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "uint16_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "uint32_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "uint64_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "uintmax_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "uintptr_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "float",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeFloating,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "double",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeFloating,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "HsPtr",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypePointer,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "HsFunPtr",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypePointer,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "char",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "short",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "int",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "unsigned int",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "size_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "wchar_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "wint_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "void",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeVoid,
-    primTypeAlignmentOf = 0,
-    primTypeSizeOf = 0 }
-  ]
-
rmfile ./arch/i686.arch
hunk ./arch/x86_64.arch 1
-arch_x86_64 = [
-  PrimType {
-    primTypeName = "uint32_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "HsChar",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "int",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "intmax_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "int8_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "int16_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "int32_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "int64_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "intmax_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "intptr_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "unsigned int",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "uint8_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "uint16_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "uint32_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "uint64_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "uintmax_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "uintptr_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "float",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeFloating,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "double",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeFloating,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "HsPtr",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypePointer,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "HsFunPtr",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypePointer,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "char",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 1,
-    primTypeSizeOf = 1 },
-  PrimType {
-    primTypeName = "short",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 2,
-    primTypeSizeOf = 2 },
-  PrimType {
-    primTypeName = "int",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "unsigned int",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "size_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 8,
-    primTypeSizeOf = 8 },
-  PrimType {
-    primTypeName = "wchar_t",
-    primTypeIsSigned = True,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "wint_t",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeIntegral,
-    primTypeAlignmentOf = 4,
-    primTypeSizeOf = 4 },
-  PrimType {
-    primTypeName = "void",
-    primTypeIsSigned = False,
-    primTypeType = PrimTypeVoid,
-    primTypeAlignmentOf = 0,
-    primTypeSizeOf = 0 }
-  ]
-
rmfile ./arch/x86_64.arch
rmdir ./arch
hunk ./data/PrimitiveOperators-in.hs 17
-import C.Arch
hunk ./data/PrimitiveOperators-in.hs 27
+import Cmm.Op(stringToOpTy)