1 /****************************** compiler.h *************************************
3 Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
5 See file COPYRIGHT for information on usage and disclaimer of warranties
7 Contains the codegenerator for an Alpha processor.
8 This module generates Alpha machine code for a sequence of
9 pseudo commands (PCMDs).
11 Authors: Reinhard Grafl EMAIL: cacao@complang.tuwien.ac.at
12 Changes: Andreas Krall EMAIL: cacao@complang.tuwien.ac.at
14 Last Change: 1997/10/22
16 *******************************************************************************/
18 /************** Compiler-switches (werden von main gesetzt) *****************/
21 extern bool compileverbose;
22 extern bool showstack;
23 extern bool showdisassemble;
24 extern bool showintermediate;
25 extern int optimizelevel;
27 extern bool checkbounds;
28 extern bool checknull;
29 extern bool checkfloats;
30 extern bool checksync;
32 extern int has_ext_instr_set;
34 extern bool getcompilingtime;
35 extern long int compilingtime;
37 extern bool statistics;
39 extern int count_jit_calls;
40 extern int count_methods;
41 extern int count_spills;
42 extern int count_pcmd_activ;
43 extern int count_pcmd_drop;
44 extern int count_pcmd_zero;
45 extern int count_pcmd_const_store;
46 extern int count_pcmd_const_alu;
47 extern int count_pcmd_const_bra;
48 extern int count_pcmd_load;
49 extern int count_pcmd_move;
50 extern int count_pcmd_store;
51 extern int count_pcmd_store_comb;
52 extern int count_pcmd_op;
53 extern int count_pcmd_mem;
54 extern int count_pcmd_met;
55 extern int count_pcmd_bra;
56 extern int count_pcmd_table;
57 extern int count_pcmd_return;
58 extern int count_pcmd_returnx;
59 extern int count_check_null;
60 extern int count_check_bound;
61 extern int count_javainstr;
62 extern int count_javacodesize;
63 extern int count_javaexcsize;
64 extern int count_calls;
65 extern int count_tryblocks;
66 extern int count_code_len;
67 extern int count_data_len;
68 extern int count_cstub_len;
69 extern int count_nstub_len;
72 /******************************* Prototypes *********************************/
74 methodptr compiler_compile (methodinfo *m);
76 void compiler_init ();
77 void compiler_close ();
79 u1 *createcompilerstub (methodinfo *m);
80 u1 *createnativestub (functionptr f, methodinfo *m);
81 u1 *ncreatenativestub (functionptr f, methodinfo *m);
83 void removecompilerstub (u1 *stub);
84 void removenativestub (u1 *stub);