#ifndef COMPILER_REGISTERS_H #define COMPILER_REGISTERS_H #include "compiler/common.h" enum { RegisterMax = 32 }; const char RegClass_SPR = 0; const char RegClass_CRFIELD = 1; const char RegClass_VR = 2; const char RegClass_FPR = 3; const char RegClass_GPR = 4; const char RegClassMax = 5; const char RegClass_6 = 6; const char RegClass_DCR = 7; 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, char rclass); extern void retain_register_for_argument(Object *obj, char rclass, short reg); extern int available_registers(char rclass); extern UInt32 volatile_registers(char rclass); extern short obtain_nonvolatile_register(char 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