X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fincludes%2FStg.h;h=2c6bf4006fe66449f91541b9367bac6ed3143056;hb=c883f6969ad957637649f3af1a2b6977555bdd32;hp=dcc66d8c70d7dec4c1cd159db5c0ad0fb4289260;hpb=68e430022a8c6b634f65edda1918a3fc3dc9acdf;p=ghc-hetmet.git diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index dcc66d8..2c6bf40 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.65 2005/01/13 16:07:33 simonmar Exp $ + * $Id: Stg.h,v 1.67 2005/02/01 14:14:41 simonmar Exp $ * * (c) The GHC Team, 1998-2004 * @@ -81,6 +81,23 @@ # error "Don't know how to inline functions with your C compiler." #endif +/* + * GCC attributes + */ +#if defined(__GNUC__) +#define GNU_ATTRIBUTE(at) __attribute__((at)) +#else +#define GNU_ATTRIBUTE(at) +#endif + +#if __GNUC__ >= 3 +#define GNUC3_ATTRIBUTE(at) __attribute__((at)) +#else +#define GNUC3_ATTRIBUTE(at) +#endif + +#define STG_UNUSED GNUC3_ATTRIBUTE(__unused__) + /* ----------------------------------------------------------------------------- Global type definitions -------------------------------------------------------------------------- */ @@ -106,7 +123,7 @@ typedef StgClosurePtr L_; typedef StgInt64 LI_; typedef StgWord64 LW_; -#define IF_(f) static F_ f(void) +#define IF_(f) static F_ GNUC3_ATTRIBUTE(used) f(void) #define FN_(f) F_ f(void) #define EF_(f) extern F_ f(void) @@ -195,7 +212,7 @@ INLINE_HEADER StgDouble PK_DBL (W_ p_src[]) { return *(StgDou * independently - unfortunately this code isn't writable in C, we * have to use inline assembler. */ -#if sparc_TARGET_ARCH +#if sparc_HOST_ARCH #define ASSIGN_DBL(dst0,src) \ { StgPtr dst = (StgPtr)(dst0); \ @@ -210,7 +227,7 @@ INLINE_HEADER StgDouble PK_DBL (W_ p_src[]) { return *(StgDou "m" (((P_)(src))[0]), "m" (((P_)(src))[1])); d; \ } ) -#else /* ! sparc_TARGET_ARCH */ +#else /* ! sparc_HOST_ARCH */ INLINE_HEADER void ASSIGN_DBL (W_ [], StgDouble); INLINE_HEADER StgDouble PK_DBL (W_ []); @@ -249,7 +266,7 @@ INLINE_HEADER StgDouble PK_DBL(W_ p_src[]) return(y.d); } -#endif /* ! sparc_TARGET_ARCH */ +#endif /* ! sparc_HOST_ARCH */ #endif /* ALIGNMENT_DOUBLE > ALIGNMENT_UNSIGNED_INT */