Initial revision
[cacao.git] / compiler.h
1 /****************************** compiler.h *************************************
2
3         Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
4
5         See file COPYRIGHT for information on usage and disclaimer of warranties
6
7         Contains the codegenerator for an Alpha processor.
8         This module generates Alpha machine code for a sequence of
9         pseudo commands (PCMDs).
10
11         Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
12         Changes: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
13
14         Last Change: 1997/10/22
15
16 *******************************************************************************/
17
18 /************** Compiler-switches (werden von main gesetzt) *****************/
19
20
21 extern bool compileverbose;     
22 extern bool showstack;          
23 extern bool showdisassemble;    
24 extern bool showintermediate;   
25 extern int   optimizelevel;      
26
27 extern bool checkbounds;        
28 extern bool checknull;          
29 extern bool checkfloats;        
30 extern bool checksync;          
31
32 extern int  has_ext_instr_set;  
33
34 extern bool getcompilingtime;   
35 extern long int compilingtime;  
36
37 extern bool statistics;         
38
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;
70
71
72 /******************************* Prototypes *********************************/
73
74 methodptr compiler_compile (methodinfo *m);
75
76 void compiler_init ();
77 void compiler_close ();
78
79 u1 *createcompilerstub (methodinfo *m);
80 u1 *createnativestub (functionptr f, methodinfo *m);
81 u1 *ncreatenativestub (functionptr f, methodinfo *m);
82
83 void removecompilerstub (u1 *stub);
84 void removenativestub (u1 *stub);
85