#include <stdio.h>
#include <strings.h>
#include "codegen.h"
#include "op_codes.h"
Go to the source code of this file.
Data Structures | |
struct | instr |
struct | fwd_ref |
Defines | |
#define | TRUE 1 |
#define | FALSE 0 |
#define | MAX_TEMP_LAB 20 |
#define | REF 0 |
#define | DEF 1 |
#define | FWD 0 |
#define | BCK 1 |
#define | dbg_msg(x) |
#define | dbg_msg2(s, x) |
#define | dbg_msg3(s, x, y) |
#define | dbg_msg4(s, x, y, z) |
Functions | |
main (int argc, char **argv) | |
save_it (struct instr *newone, int opc, arg, char *label_buf) | |
int | next_opc () |
int | normal_label (int opc, char *p) |
put_reg_op (int opc, arg) | |
put_lbl_op (int opc, char *label) | |
char * | fixit (char *str) |
usage (char *name) | |
Variables | |
int | last_type |
int | last_num |
int | last_dir |
struct instr * | instr_list = (struct instr *) 0 |
struct instr * | tail_il = (struct instr *) 0 |
struct fwd_ref * | fwd_refs [MAX_TEMP_LAB+1] |
char * | op_code_table [] |
char | label_buf [MAXLABELSZ+1] |
char | save_label [MAXLABELSZ+1] |
char * | crud [20] |
char * | cur_name [MAX_TEMP_LAB+1] |
int | num_fwd_refs = 0 |
int | lbl_num = 0 |
int | read_ahead = FALSE |
int | saved_opc |
FILE * | in_file |
FILE * | out_file |
#define BCK 1 |
#define dbg_msg2 | ( | s, | |||
x | ) |
#define dbg_msg3 | ( | s, | |||
x, | |||||
y | ) |
#define dbg_msg4 | ( | s, | |||
x, | |||||
y, | |||||
z | ) |
#define DEF 1 |
#define FALSE 0 |
Definition at line 37 of file delab.c.
Referenced by add_id_fv(), add_objfile(), amatch(), bld_analyze(), C_name(), calls_callcc(), calls_put(), checksigs(), cl_analyze(), clear_construction(), clear_equiv(), clear_slink_known(), comp1_st(), comp_st(), compile_decl(), compile_while_loop(), declsig(), def_match(), delcomp(), dl_match(), eliminate(), eval_decl(), find_equiv_regs(), findapplsig(), finddecl(), finddecl1(), findidsig(), findmpsig(), findsig(), findstdecl(), finish_idt(), fix_array_sig(), fixhints(), Gappl(), Garg_expression(), GC_allochblk(), GC_block_empty(), GC_collect_or_expand(), GC_continue_reclaim(), GC_expand_hp_inner(), GC_gcollect_inner(), GC_has_debug_info(), GC_mark_reliable(), GC_reclaim_block(), Gcompile_funcs(), gen_special(), getcomp(), Gexpression(), Gfunc_body(), Gfuncconstructor(), Ggen_special(), Ggeneratecode(), Ggeneratepcode(), GgenerateXcode(), Gheap_expression(), Gident(), Gpush_size(), Gtraverse(), hascomp(), hasstring(), import(), impure(), infer_args(), is_const(), is_const_init(), is_int_const(), is_int_const1(), is_selected_id(), is_this_arg(), main(), make_instr(), maprl1_non_vacuous(), mentions_r11(), n_vacuous_params(), needs_new_nonl(), normal_label(), only_indirect_ref(), outermost_op(), parse_RIC(), propagate(), replace_arg(), roots_present(), set_regs(), sigids(), solve(), stt_enter(), subst1(), tl_checksigs(), trivial(), tsubst1(), type_constr(), unparse(), unshare1(), vacuous_arg(), valid_C_id(), Vallocate(), Vallocwalk(), Vappl(), Vfuncbody(), Vfuncconstructor(), Vgeneratecode(), Vnewreg(), wl_has_comp(), and yylex().
#define FWD 0 |
#define REF 0 |
#define TRUE 1 |
Definition at line 36 of file delab.c.
Referenced by accessible(), add_id_fv(), add_idt(), add_objfile(), amatch(), bld_analyze(), body_accessible(), C_name(), check_vacuous(), checksigs(), cl_analyze(), clear_construction(), clear_equiv(), coerce(), comp1_st(), copy_RIC(), def_match(), delcomp(), dl_match(), eliminate(), equiv_expr(), eval_decl(), expand_str(), Ffuncbody(), find_equiv_regs(), find_forward_refs(), finddecl(), finddecl1(), findidsig(), findmpsig(), findsig(), findstdecl(), fixhints(), Gappl(), GC_allochblk(), GC_block_empty(), GC_collect_or_expand(), GC_debug_malloc(), GC_debug_malloc_atomic(), GC_disable_signals(), GC_expand_hp_inner(), GC_gcollect(), GC_gcollect_inner(), GC_has_debug_info(), GC_normal_mark_proc(), GC_reclaim_block(), GC_register_displacement_inner(), Gcompile_funcs(), gen_special(), get_complexity(), get_name(), getcomp(), Gexpression(), Gfunc_body(), Ggen_special(), Ggeneratecode(), Ggeneratepcode(), GgenerateXcode(), Gpush_size(), hascomp(), hasstring(), import(), impure(), infer_args(), inscomp(), is_const(), is_int_const1(), is_selected_id(), is_this_arg(), is_unique(), main(), make_lbl_instr(), mentions_r11(), mk_put_selection(), mkcompnm(), needs_new_nonl(), next_opc(), normal_label(), only_indirect_ref(), parse_RIC(), propagate(), replace_arg(), roots_present(), set_regs(), sig_in1(), sigids(), solve(), stt_enter(), subst1(), trivial(), tsubst1(), unparse(), unshare1(), vacuous_arg(), valid_C_id(), Vallocate(), Vallocwalk(), Vappl(), Vgeneratecode(), Vgeneratepcode(), Vretreg(), and wl_has_comp().
char* fixit | ( | char * | str | ) |
main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 118 of file delab.c.
References instr::arg, crud, cur_name, dbg_msg, dbg_msg2, dbg_msg3, dbg_msg4, DEF, FALSE, free, FWD, in_file, fwd_ref::inst, instr::label, label_buf, last_dir, last_num, last_type, LBA, lbl_num, malloc, MAX_LABEL_OP, MAXLABELSZ, N_OP_CODES, instr::next, fwd_ref::next, normal_label(), num_fwd_refs, op_code_table, instr::opc, out_file, put_lbl_op(), put_reg_op(), read_ahead, save_it(), save_label, saved_opc, TRUE, and usage().
int next_opc | ( | ) |
Definition at line 384 of file delab.c.
References in_file, read_ahead, saved_opc, and TRUE.
Referenced by normal_label().
int normal_label | ( | int | opc, | |
char * | p | |||
) |
put_lbl_op | ( | int | opc, | |
char * | label | |||
) |
put_reg_op | ( | int | opc, | |
arg | ||||
) |
save_it | ( | struct instr * | newone, | |
int | opc, | |||
arg | , | |||
char * | label_buf | |||
) |
Definition at line 345 of file delab.c.
References instr::arg, dbg_msg, dbg_msg2, dbg_msg4, instr::label, malloc, MAXLABELSZ, instr::next, op_code_table, and instr::opc.
Referenced by main().
char* cur_name[MAX_TEMP_LAB+1] |
Initial value:
{ "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", "..............", ".............." }
Definition at line 85 of file delab.c.
Referenced by main().
FILE* in_file |
struct instr* instr_list = (struct instr *) 0 |
char label_buf[MAXLABELSZ+1] |
int last_dir |
int last_num |
int last_type |
int num_fwd_refs = 0 |
char* op_code_table[] |
Definition at line 4 of file op_codes.c.
Referenced by init_RIC_table(), main(), normal_label(), save_it(), and unindirect().
FILE * out_file |
int read_ahead = FALSE |
char save_label[MAXLABELSZ+1] |
int saved_opc |