/* $Header:macdefs.h 12.0$ */
/* $ACIS:macdefs.h 12.0$ */
/* $Source: /ibm/acis/usr/src/lib/pcc_ca/RCS/macdefs.h,v $ */
# include <frame.h>	/* WFA 7/15/85 */
/*
# define makecc(val,i)  lastcon = (lastcon<<8)|((val<<24)>>24);
*/

# define makecc(val,i)  lastcon = (lastcon<<8)|(val&0xff);

/* minimum number of registers saved/restored on function entry/exit JEC */

# define NREGSTK 3	/* WFA 7/7/85 only save DP and Return Address for CSL */

/* (ef) 11/30/85 -- Following offsets are offsets from frame pointer */
/*                  which is in register FPREG                       */
#define FPREG	13

/* offset (bits) to 1st. automatic (local) var in the frame, from SP+.PVftnno */
/*# define AUTOINIT	0	/* WFA 7/9/85 */
#define AUTOINIT	(-64*SZCHAR)

/* offset (bits) to first parameter passed to callee in the frame */
/*# define ARGINIT	(FRAME_SZ+ARG1_OFFSET)*SZCHAR	/* WFA 7/9/85 */
#define ARGINIT		(LINK_SAVE_SZ*SZCHAR)

/*#define GETARGREG(n)	(2+((n-LINK_SAVE_SZ)/4))*/
# define GETARGREG(n)	(6 + ((n)/4))	/* -ve ga_byteoff=> R2..R5 WFA 7/9/85 */

/* sizes of data types, in bits */

# define SZCHAR 8
# define SZINT 32
# define SZFLOAT 32
# define SZDOUBLE 64
# define SZLONG 32
# define SZSHORT 16
# define SZPOINT 32

/* alignments of data types, in bits */

# define ALCHAR 8
# define ALINT 32
# define ALFLOAT 32
# define ALDOUBLE 32
# define ALLONG 32
# define ALSHORT 16
# define ALPOINT 32
# define ALSTRUCT 8
# define ALSTACK 32

/*  size in which constants are converted */
/*  should be long if feasable */

# define CONSZ long
# define CONFMT "%ld"

/*  size in which offsets are kept
/*  should be large enough to cover address space in bits
*/

# define OFFSZ long

/*  character set macro */

# define  CCTRANS(x) x

/* (ef) 1/28/86 -- moved from allo.c */
/*  minimum and maximum register variables */

#define MINARGREG 2
#define MAXARGREG 5
#define INARGS(r)	((r>=MINARGREG)||(r<=MAXARGREG))

/*  maximum and minimum register variables */

#ifndef FORT
# define MINRVAR 6
# define MAXRVAR 11
#else
# define MINRVAR 6
# define MAXRVAR 10
#endif FORT

    /* various standard pieces of code are used */
# define STDPRTREE
# define LABFMT "L%d"

/* show stack grows negatively */
#define BACKAUTO
#define BACKTEMP

/* show field hardware support on VAX, what is this doing ??? jec ??? */
/* #define FIELDOPS */

/* bytes are numbered from left to right, do not define RTOLBYTES */
/* #define RTOLBYTES */

/* we want prtree included */
# define STDPRTREE
# ifndef FORT
# define ONEPASS
#endif

# define ENUMSIZE(high,low) INT

/* types of function arguments that cannot presently be directly 
   loaded by templates into registers WFA 7/11/85 */

/* (ef) 11/19/85 -- floats get promoted to double! */
/*# define ARGINREG(t)	(t!=STRTY&&t!=UNIONTY&&t!=DOUBLE)*/
#define ARGINREG(t)	(t!=STRTY&&t!=UNIONTY&&t!=DOUBLE&&t!=FLOAT)

/* maximum and minimum constants allowed by ibm032 as immediate operands */

# define MAXIVAL ((1<<15)-1)
# define MINIVAL (-(1<<15))

/* due to teri at paloalto... */

#define FIXDEF(p) outstab(p)

#define FIXARG(p) fixarg(p)
