Changed the makefile system to autoconf/automake.
[cacao.git] / jit.h
1 /* jit.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         new compiler header file for inclusion in other moduls.
8
9         Authors: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
10                  Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
11
12         Last Change: 1997/11/05
13
14 *******************************************************************************/
15
16 #ifndef __jit__
17 #define __jit__
18
19 /* compiler switches (set by main function) ***********************************/
20
21 extern bool runverbose;         /* trace all method invocation                */
22 extern bool compileverbose;     /* trace compiler actions                     */
23 extern bool showdisassemble;    /* generate disassembler listing              */
24 extern bool showddatasegment;   /* generate data segment listing              */
25 extern bool showintermediate;   /* generate intermediate code listing         */
26 extern int  optimizelevel;      /* optimzation level  (0 = no optimization)   */
27
28 extern bool checkbounds;        /* check array bounds                         */
29 extern bool checknull;          /* check null pointers                        */
30 extern bool checkfloats;        /* implement ieee compliant floats            */
31 extern bool checksync;          /* do synchronization                         */
32
33 extern bool getcompilingtime;   /* compute compile time                       */
34 extern long compilingtime;      /* accumulated compile time                   */
35
36 extern int  has_ext_instr_set;  /* has instruction set extensions */
37
38 extern bool statistics;         
39
40 extern int count_jit_calls;
41 extern int count_methods;
42 extern int count_spills;
43 extern int count_pcmd_activ;
44 extern int count_pcmd_drop;
45 extern int count_pcmd_zero;
46 extern int count_pcmd_const_store;
47 extern int count_pcmd_const_alu;
48 extern int count_pcmd_const_bra;
49 extern int count_pcmd_load;
50 extern int count_pcmd_move;
51 extern int count_load_instruction;
52 extern int count_pcmd_store;
53 extern int count_pcmd_store_comb;
54 extern int count_dup_instruction;
55 extern int count_pcmd_op;
56 extern int count_pcmd_mem;
57 extern int count_pcmd_met;
58 extern int count_pcmd_bra;
59 extern int count_pcmd_table;
60 extern int count_pcmd_return;
61 extern int count_pcmd_returnx;
62 extern int count_check_null;
63 extern int count_check_bound;
64 extern int count_max_basic_blocks;
65 extern int count_basic_blocks;
66 extern int count_max_javainstr;
67 extern int count_javainstr;
68 extern int count_javacodesize;
69 extern int count_javaexcsize;
70 extern int count_calls;
71 extern int count_tryblocks;
72 extern int count_code_len;
73 extern int count_data_len;
74 extern int count_cstub_len;
75 extern int count_nstub_len;
76 extern int count_max_new_stack;
77 extern int count_upper_bound_new_stack;
78 extern int *count_block_stack;
79 extern int *count_analyse_iterations;
80 extern int *count_method_bb_distribution;
81 extern int *count_block_size_distribution;
82 extern int *count_store_length;
83 extern int *count_store_depth;
84
85 /* prototypes *****************************************************************/
86
87 methodptr jit_compile (methodinfo *m);  /* compile a method with jit compiler */
88
89 void jit_init();                        /* compiler initialisation            */
90 void jit_close();                       /* compiler finalisation              */
91
92 u1 *createcompilerstub (methodinfo *m);
93 u1 *createnativestub (functionptr f, methodinfo *m);
94
95 void removecompilerstub (u1 *stub);
96 void removenativestub (u1 *stub);
97
98 #endif
99
100 /*
101  * These are local overrides for various environment variables in Emacs.
102  * Please do not remove this and leave it at the end of the file, where
103  * Emacs will automagically detect them.
104  * ---------------------------------------------------------------------
105  * Local variables:
106  * mode: c
107  * indent-tabs-mode: t
108  * c-basic-offset: 4
109  * tab-width: 4
110  * End:
111  */