X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStgTypes.h;h=ac2f78e27c0da63935185ed059f5a1b654449005;hb=c137ecd7e6e83d0f9c39b15ccdb9f2355f243c91;hp=fd9401d93da94d89bf635e3e7ff3b2b7be1f9ffe;hpb=47774449c9d66b768a70851fe82c5222c1f60689;p=ghc-hetmet.git diff --git a/ghc/includes/StgTypes.h b/ghc/includes/StgTypes.h index fd9401d..ac2f78e 100644 --- a/ghc/includes/StgTypes.h +++ b/ghc/includes/StgTypes.h @@ -1,10 +1,9 @@ /* ----------------------------------------------------------------------------- - * $Id: StgTypes.h,v 1.17 2001/07/26 03:08:39 ken Exp $ * - * (c) The GHC Team, 1998-2000 + * (c) The GHC Team, 1998-2004 * * Various C datatypes used in the run-time system. This is the - * lowest-level include file, after config.h and Derived.h. + * lowest-level include file, after ghcconfig.h and RtsConfig.h. * * This module should define types *only*, all beginning with "Stg". * @@ -25,9 +24,9 @@ StgCode, StgArray, StgByteArray, StgStablePtr, StgFunPtr, StgUnion. - * WARNING: Keep this file and HsFFI.h in synch! + * WARNING: Keep this file, MachDeps.h, and HsFFI.h in synch! * - * NOTE: assumes #include "config.h" + * NOTE: assumes #include "ghcconfig.h" * * Works with or without _POSIX_SOURCE. * @@ -36,8 +35,6 @@ #ifndef STGTYPES_H #define STGTYPES_H -#include "Derived.h" - /* * First, platform-dependent definitions of size-specific integers. * Assume for now that the int type is 32 bits. @@ -51,7 +48,6 @@ typedef unsigned char StgWord8; typedef signed short StgInt16; typedef unsigned short StgWord16; - #if SIZEOF_UNSIGNED_INT == 4 typedef signed int StgInt32; typedef unsigned int StgWord32; @@ -61,8 +57,13 @@ typedef unsigned int StgWord32; #ifdef SUPPORT_LONG_LONGS /* assume long long is 64 bits */ +# ifndef _MSC_VER typedef signed long long int StgInt64; typedef unsigned long long int StgWord64; +# else +typedef __int64 StgInt64; +typedef unsigned __int64 StgWord64; +# endif #elif SIZEOF_LONG == 8 typedef signed long StgInt64; typedef unsigned long StgWord64; @@ -81,10 +82,14 @@ typedef unsigned __int64 StgWord64; #if SIZEOF_VOID_P == 8 typedef StgInt64 StgInt; typedef StgWord64 StgWord; +typedef StgInt32 StgHalfInt; +typedef StgWord32 StgHalfWord; #else #if SIZEOF_VOID_P == 4 typedef StgInt32 StgInt; typedef StgWord32 StgWord; +typedef StgInt16 StgHalfInt; +typedef StgWord16 StgHalfWord; #else #error GHC untested on this architecture: sizeof(void *) != 4 or 8 #endif @@ -109,6 +114,7 @@ typedef void StgVoid; typedef struct StgClosure_ StgClosure; typedef StgClosure* StgClosurePtr; typedef StgWord* StgPtr; /* pointer into closure */ +typedef StgWord volatile* StgVolatilePtr; /* pointer to volatile word */ typedef StgWord StgOffset; /* byte offset within closure */ typedef struct StgTSO_* StgTSOPtr; @@ -143,18 +149,4 @@ typedef void* StgStablePtr; typedef void *(*(*StgFunPtr)(void))(void); typedef StgFunPtr StgFun(void); -typedef union { - StgWord w; - StgAddr a; - StgChar c; - StgInt8 i8; - StgFloat f; - StgInt i; - StgPtr p; - StgClosurePtr cl; - StgStackOffset offset; /* unused? */ - StgByteArray b; - StgTSOPtr t; -} StgUnion; - #endif /* STGTYPES_H */