#ifndef _MACROS_H #define _MACROS_H #ifdef __arm #define NEW_CPP #endif #ifdef __ANSI__ #define NEW_CPP #endif #ifdef __STRICT_ANSI__ #define NEW_CPP #endif #ifdef __GNUC__ #define NEW_CPP #endif #ifdef __STDC__ #define NEW_CPP #endif #define IND_TAG 0 #define VAP_TAG 1 #define VAP_TAG0 1 #define VAP_TAG1 3 #define CON_TAG 2 #define MASK_WTAG 3 #define MASK_HTAG 1 #define CON_DATA 0x00 /* Must NOT contain CON_PTRS */ #define CON_PTRS 0x04 /* Must contain CON_PTRS */ #define CON_CDATA 0x08 /* Must NOT contain CON_PTRS */ #define CON_WORDS 0x0c /* Must contain CON_PTRS */ #define MASK_CON 0x0c /* Must be same as in node.h and nhccomp/Lift.hs */ #define CONSTR(c,s,ws) ( ((s)<<24) | (((s)-(ws))<<16) | ((c)<<4) | CON_DATA | CON_TAG) #define CONSTRC(c,s,ws) ( ((s)<<24) | (((s)-(ws))<<16) | ((c)<<4) | CON_CDATA | CON_TAG) #define CONSTRW(s,e) ( ((s)<<(4+LARGE_EXTRA)) | (((e)&((1<>3) #define ZAP_BIT (1L<<(WORDSIZE-1)) #ifndef FILL4toWORD #define FILL4toWORD #endif #ifndef LARGE_EXTRA #define LARGE_EXTRA 2 #define LARGE_SIZE 26 #endif #ifdef HIGH_BYTE_FIRST #define JT(h) DB (((h)>>8)&0xff),((h)&0xff) #define HW(b,a) ((a) | ((b) << (4*NS))) #define FSTHW(w) ((w)>>(4*NS)) #define SNDHW(w) ((w)&( (1<<(4*NS))-1)) #endif #ifdef LOW_BYTE_FIRST #define JT(h) DB ((h)&0xff),(((h)>>8)&0xff) #define HW(b,a) ((b) | ((a) << (4*NS))) #define FSTHW(w) ((w)&( (1<<(4*NS))-1)) #define SNDHW(w) ((w)>>(4*NS)) #endif #define VAPTAG(fun) L(fun) - (NS + 2) + VAP_TAG #define CAPTAG(fun,need) L(fun) - (NS + 2 + (2 * need)) + VAP_TAG #define C_VAPTAG(fun) fun - (NS + 2) + VAP_TAG #define C_CAPTAG(fun,need) fun - (NS + 2 + (2 * need)) + VAP_TAG #ifndef DIR_DEL #define DIR_DEL '/' #endif #endif