#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