blob: 685aa0d7a0e951814ed183555ad883206705c597 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef COMPILER_REGISTERS_H
#define COMPILER_REGISTERS_H
#include "compiler/common.h"
enum {
RegisterInvalid = -1,
Register0 = 0,
Register2 = 2,
Register3 = 3,
Register4 = 4,
RegisterMax = 32
};
enum {
RegState0 = 0,
RegState1 = 1,
RegState2 = 2
};
extern int used_virtual_registers[RegClassMax];
extern int used_nonvolatile_registers[RegClassMax];
extern int assignable_registers[RegClassMax];
extern int n_real_registers[RegClassMax];
extern int n_scratch_registers[RegClassMax];
extern int scratch_registers[RegClassMax][RegisterMax];
extern int n_nonvolatile_registers[RegClassMax];
extern int nonvolatile_registers[RegClassMax][RegisterMax];
extern UInt8 reg_state[RegClassMax][RegisterMax];
extern int first_temporary_register[RegClassMax];
extern int last_temporary_register[RegClassMax];
extern char *register_class_name[RegClassMax];
extern char *register_class_format[RegClassMax];
extern int coloring;
extern int optimizing;
extern void init_registers(void);
extern void assign_register_to_variable(Object *obj, RegClass rclass);
extern void retain_register_for_argument(Object *obj, RegClass rclass, short reg);
extern int available_registers(RegClass rclass);
extern UInt32 volatile_registers(RegClass rclass);
extern short obtain_nonvolatile_register(RegClass rclass);
extern void open_temp_registers(void);
extern void check_temp_registers(void);
extern void close_temp_registers(void);
extern int count_scratch_registers(void);
extern void init_modified_registers(void);
extern void note_modified_registers(Object *obj);
extern void find_modified_registers(Object *obj, UInt32 *masks);
#endif
|