/* Copyright (C) 2000 Analog Devices Inc., All Rights Reserved.
** This contains Development IP as
** defined in the ADI/Intel Collaboration Agreement.
** ADI/Intel Confidential
*/

/* this file is for architecture dependent prototypes only. Please use
** the prototypes file in /common for machine-independent ones.
*/

void Cargproc(struct Stkfmt *, int);

/* from p5procs.c */
void p5AdjustParamOffset(int);
int p5instrsize(struct instrfmt *);
void p5link(int,int,int);
struct instrfmt * nextrefordef(struct instrfmt *instr ,int reg);
/* defines for previous ref & previous def */
#define ALLOW_REF 0
#define DISALLOW_REF 1
#define FULL_DEF 8
#define ALLOW_FRAGCHANGE 16
int ParseRegName(const char *str);

#define STACKST_MAP(x)  ((-(x)+3)>>2)
#define STACKST_SIZE (STACKST_MAP(STACKST_LO)+1)

/* records the location of the STore instruction
 * for each parameter register
 */
extern unsigned char StackSTflags [STACKST_SIZE];

/* from p5code.c */
void p5disasinstr(struct instrfmt *instr,int *ca);
void p5correct_refdefs(int, struct instrfmt *);
void p5return();
void p5returni(int);
void p5jumpi(int opcode, int);
void p5mv(int rs,unsigned s1,int rd,unsigned s2,int sign);
void p5fixup(int op,int area, int offset, int rd);
void p5labfix(int op,int labx, int rd);
void p5push(int reg,unsigned size);
void p5accessindri(int is_unsigned,
int rd,int ireg,int disp, int size, int flags);
void p5cbufldst(int, int, int, int);
void p5cbufmodify(int, int, int);
void p5callind(int,int,int,int);
void p5frlabel(int labx,int count, int curfragaddr);
void p5GOTfix(int GOTreg);
void p5oprfixmem(int op,int area,int offset,int rd,int size);
void p5modinstrprops(int rem,int add,int prem,int padd);
void p5unassfill(int Label,int proclevel,int unassdisp);
void p5notediagdisp(int diagdisp,int stackoffset);
void p5dowrapping(int localsize,int cgoptions);
int p5paramdisp(int);
int p5validlit(int);
int p5stackdisp(int);
void p5modify(int ireg, int mreg, int rd);
void p5oprx( int ,int ,struct Stkfmt *,int );
void p5init(int options);
void p5reinit();
void p5plantnop(void);
void p5modifylit(int ireg, int lit, int rd);
void p5init(int);
void p5reinit(void);
void p5setoptstyle(int);
void p5setpi(struct procfmt *);
void p5free(void *);
void p5disasinstr(struct instrfmt *, int *);
void p5dowrapping(int, int);
void p5regreduction(void);
int p5askforlabelnum(void);
int p5conditionmatch(struct instrfmt *, struct instrfmt *);
int p5createnop(void);
int p5createuncond(int);
void p5deleteswitch(struct fragfmt *);
void p5filldelayslot(struct fragfmt *, struct instrfmt *);
int p5hasannullableslots(void);
int p5improvereturn(struct fragfmt *);
int p5improveswitch(struct fragfmt *);
int p5invertbranch(struct instrfmt *, int, int);
int p5isaddrlabel(int);
void p5flushoutput(int);
int p5memoryoverlap(struct instrfmt *, struct instrfmt *, int);
void p5printarchinfo(int);
void p5printentryname(int);
void p5printinstr(struct instrfmt *);
void p5printregisters(int, int, int);
void p5printswitch(struct fragfmt *);
void p5setlabelrefs(struct fragfmt *);
void p5rlit(int op,int rs1,int lit,int rd);
void p5modinstrprops(int, int, int, int);
void p5notelit(int );
void p5modinstrcxt(int );
void p5rr(int op,int rs1,int rs2,int rd);
void p5returnfrommain(void);
void p5call(int, int, int);
void p5oplit(int op,int rs1,int lit,int rd);
void p5odd(int op,int refs,int defs,...);
void p5oddlit(int op,int refs,int defs,...);
void p5loadlit(int lit,int rd);
void p5setmmode(int mode);
void p5labfix(int op,int labx, int rd);
void p5pop(int reg);
void p5stkaccess(int, int, struct Stkfmt *);
void p5copyreg(int, int);
void p5copyireg(int, int);
void p5copyfreg(int, int, int);
int p5tempspace(int, int);
void p5notediagdisp(int, int);
int p5AdaptStore(struct instrfmt *,int,int );
int p5AdaptSource(struct instrfmt *,int,int,int);
void p5plantnop(void);
void p5initTables(void);
void p5oprmem(int op,int base,int disp,int rd,int size);
void p5fopmem(int op,int base,int disp,int size);
void p5fopfixmem(int op,int area,int offset,int size);
void p5opr(int op,int rd);
void p5genmemaccess(int ,int ,int ,int ,int ,int ,int ,int ,int);
void p5storeri(int op,int rd,int rs1,int lit);
void p5loadri( int ,int ,int ,int );
void p5oponly(int ,int ,int);
void p5bcc(int , int, int);
void p5bcctf(int, int, int);
void p5fopr(int ,int);
void p5oplitmem(int ,int ,int ,int ,int);
void p5calllocal(int ,int);
void p5addprefix(int which,int prefixvalue);
void p5alterareaoffset(int newarea,int newoffset);



