C:/Users/Dennis/src/lang/russell.orig/src/pass5c/codegen.c File Reference

#include "parm.h"
#include <stdio.h>
#include "stree/ststructs.mh"
#include "codeutil.h"
#include "pass4/sigs.h"
#include "pass3/is_local.h"

Go to the source code of this file.

Data Structures

struct  Fc_Entry

Defines

#define IFDEBUG(x)
#define UNDEF   (0x87654321)
#define MAXOBJSZ   512
#define MAX_PROD_EXP_LEN   5

Typedefs

typedef struct Fc_Entry fc_entry

Functions

boolean mentions_r11 ()
void type_expr ()
boolean is_int_const ()
void add_objfile (char *fn)
void fc_add (NODE *ptr, int lvl, int fast_only)
void fc_delete ()
 Vgeneratecode (FILE *f, NODE *p)
 Vgeneratepcode (FILE *f, NODE *q, NODE *p)
 Vfuncconstructor (NODE *p)
 Vfuncbody (NODE *p, int l)
 Vexpression (NODE *p)
 gen_special (unsigned spcl)
 copy_r10_to_r0 (int copycnt)
 copy_r3_to_r2 (int copycnt)
char * Vspcl_to_inline (unsigned spcl)
boolean mentions_r11 (char *string)
void type_expr (NODE *re)

Variables

int yydebug
int yynerrs
boolean Pflag
boolean Tflag
char * entry_name
char str_code_buf [MAXSTRCODELEN]
FILE * objfilelist = NULL
fc_entryfc_list = NIL
int Ventry_mask
int Vgc_mask
int Vlevel = -1
NODEVcurrent
FILE * Voutfile


Define Documentation

#define IFDEBUG (  ) 

Definition at line 25 of file codegen.c.

#define MAX_PROD_EXP_LEN   5

Referenced by Gspcl_to_inline(), and Vspcl_to_inline().

#define MAXOBJSZ   512

Definition at line 29 of file codegen.c.

#define UNDEF   (0x87654321)

Definition at line 28 of file codegen.c.


Typedef Documentation

typedef struct Fc_Entry fc_entry


Function Documentation

void add_objfile ( char *  fn  ) 

Definition at line 52 of file codegen.c.

References OBJFILELIST, and objfilelist.

copy_r10_to_r0 ( int  copycnt  ) 

Definition at line 1055 of file codegen.c.

References CODE.

copy_r3_to_r2 ( int  copycnt  ) 

Definition at line 1075 of file codegen.c.

References CODE.

void fc_add ( NODE ptr,
int  lvl,
int  fast_only 
)

Definition at line 84 of file codegen.c.

References Fc_Entry::fc_fast_only, Fc_Entry::fc_level, Fc_Entry::fc_next, Fc_Entry::fc_pointer, and malloc.

void fc_delete (  ) 

Definition at line 99 of file codegen.c.

References Fc_Entry::fc_next, and free.

Referenced by Vgeneratecode(), and Vgeneratepcode().

gen_special ( unsigned  spcl  ) 

Definition at line 912 of file codegen.c.

References dbgmsg, FALSE, FO_EP, FO_IP, FO_OBJ_SIZE, FO_SIZE, FXD_NEWOBJ, n_args, putcomment, TRUE, and Voutfile.

boolean is_int_const (  ) 

boolean mentions_r11 ( char *  string  ) 

Definition at line 1176 of file codegen.c.

References FALSE, and TRUE.

boolean mentions_r11 (  ) 

void type_expr ( NODE re  ) 

Definition at line 1197 of file codegen.c.

References Vexpression().

void type_expr (  ) 

Vexpression ( NODE p  ) 

Definition at line 302 of file codegen.c.

References ASSERT, ASSERT2, calls_put(), CODE, DISPLAY, FXD_NEWOBJ, getname(), int_const_val, is_int_const(), MAXSTRLEN, NIL, ObjSize, POP, POP_DISP, PUSH, PUSH_DISP, putcomment, putcomment1, R10, sig, str_code_buf, UNDEF, v, Vappl(), Ventry_mask, Vexpression(), Vlevel, Vnewlabel(), Voutfile, and Vtraverse().

Vfuncbody ( NODE p,
int  l 
)

Definition at line 243 of file codegen.c.

References CODE, FALSE, L0FP, L0fp, Pflag, POP, putcomment, Tflag, Vcall_mcount(), Vcurrent, Ventry_mask, Ventry_trace(), Vexit_trace(), Vexpression(), Vgc_mask, Vlevel, Vnewlabel(), and Voutfile.

Referenced by Vgeneratecode(), and Vgeneratepcode().

Vfuncconstructor ( NODE p  ) 

Definition at line 195 of file codegen.c.

References FALSE, fc_add(), FO_EP, FO_IP, FO_OBJ_SIZE, FO_SIZE, FXD_NEWOBJ, length(), n_args, PUSH, putcomment, Vlevel, and Voutfile.

Referenced by Vgeneratepcode().

Vgeneratecode ( FILE *  f,
NODE p 
)

Definition at line 115 of file codegen.c.

References accessible(), analyze(), ASM_HEADER, bld_analyze(), FALSE, fc_add(), fc_delete(), Fc_Entry::fc_fast_only, Fc_Entry::fc_level, Fc_Entry::fc_pointer, Ffuncbody(), NIL, prtree(), TRUE, Vallocate(), Vfuncbody(), Voutfile, and yydebug.

Referenced by main().

Vgeneratepcode ( FILE *  f,
NODE q,
NODE p 
)

Definition at line 148 of file codegen.c.

References accessible(), analyze(), bld_analyze(), dbgmsg, entry_name, errmsg0, fc_delete(), Fc_Entry::fc_fast_only, Fc_Entry::fc_level, Fc_Entry::fc_pointer, Ffuncbody(), NIL, ofname, prtree(), TRUE, Vallocate(), Vfuncbody(), Vfuncconstructor(), Vlevel, Voutfile, and yydebug.

Referenced by main().

char* Vspcl_to_inline ( unsigned  spcl  ) 

Definition at line 1097 of file codegen.c.

References malloc, MAX_PROD_EXP_LEN, NIL, str_code_buf, UNDEF, and val().


Variable Documentation

char* entry_name

Definition at line 144 of file main.c.

fc_entry* fc_list = NIL

Definition at line 81 of file codegen.c.

FILE* objfilelist = NULL

Definition at line 49 of file codegen.c.

Referenced by add_objfile(), and main().

boolean Pflag

Definition at line 127 of file main.c.

char str_code_buf[MAXSTRCODELEN]

Definition at line 45 of file codegen.c.

boolean Tflag

Definition at line 128 of file main.c.

NODE* Vcurrent

Definition at line 110 of file codegen.c.

int Ventry_mask

Definition at line 107 of file codegen.c.

Referenced by Vappl(), Vexpression(), Vfuncbody(), and Vnewreg().

int Vgc_mask

Definition at line 107 of file codegen.c.

Referenced by Vappl(), Vfuncbody(), and Vretreg().

int Vlevel = -1

Definition at line 108 of file codegen.c.

Referenced by Vexpression(), Vfuncbody(), Vfuncconstructor(), Vgeneratepcode(), and Vtraverse().

FILE* Voutfile

Definition at line 111 of file codegen.c.

int yydebug

Definition at line 58 of file scan.c.

int yynerrs

Definition at line 31 of file testvertex.c.


Generated on Fri Jan 25 10:39:50 2008 for russell by  doxygen 1.5.4