Copyright (C) 2000-2012 |
GNU Info (gcc-295.info)Register BasicsBasic Characteristics of Registers ---------------------------------- Registers have various characteristics. `FIRST_PSEUDO_REGISTER' Number of hardware registers known to the compiler. They receive numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number really is assigned the number `FIRST_PSEUDO_REGISTER'. `FIXED_REGISTERS' An initializer that says which registers are used for fixed purposes all throughout the compiled code and are therefore not available for general allocation. These would include the stack pointer, the frame pointer (except on machines where that can be used as a general register when no frame pointer is needed), the program counter on machines where that is considered one of the addressable registers, and any other numbered register with a standard use. This information is expressed as a sequence of numbers, separated by commas and surrounded by braces. The Nth number is 1 if register N is fixed, 0 otherwise. The table initialized from this macro, and the table initialized by the following one, may be overridden at run time either automatically, by the actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. `CALL_USED_REGISTERS' Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in general) by function calls as well as for fixed registers. This macro therefore identifies the registers that are not available for general allocation of values that must live across function calls. If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically saves it on function entry and restores it on function exit, if the register is used within the function. `HARD_REGNO_CALL_PART_CLOBBERED (REGNO, MODE)' A C expression that is non-zero if it is not permissible to store a value of mode MODE in hard register number REGNO across a call without some part of it being clobbered. For most machines this macro need not be defined. It is only required for machines that do not preserve the entire contents of a register across a call. `CONDITIONAL_REGISTER_USAGE' Zero or more C statements that may conditionally modify four variables `fixed_regs', `call_used_regs', `global_regs' (these three are of type `char []') and `reg_class_contents' (of type `HARD_REG_SET'). Before the macro is called `fixed_regs', `call_used_regs' and `reg_class_contents' have been initialized from `FIXED_REGISTERS', `CALL_USED_REGISTERS' and `REG_CLASS_CONTENTS', respectively, `global_regs' has been cleared, and any `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG' command options have been applied. This is necessary in case the fixed or call-clobbered registers depend on target flags. You need not define this macro if it has no work to do. If the usage of an entire class of registers depends on the target flags, you may indicate this to GCC by using this macro to modify `fixed_regs' and `call_used_regs' to 1 for each of the registers in the classes which should not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return `NO_REGS' if it is called with a letter for a class that shouldn't be used. (However, if this class is not included in `GENERAL_REGS' and all of the insn patterns whose constraints permit this class are controlled by target switches, then GCC will automatically avoid using these registers when the target switches are opposed to them.) `NON_SAVING_SETJMP' If this macro is defined and has a nonzero value, it means that `setjmp' and related functions fail to save the registers, or that `longjmp' fails to restore them. To compensate, the compiler avoids putting variables in registers in functions that use `setjmp'. `INCOMING_REGNO (OUT)' Define this macro if the target machine has register windows. This C expression returns the register number as seen by the called function corresponding to the register number OUT as seen by the calling function. Return OUT if register number OUT is not an outbound register. `OUTGOING_REGNO (IN)' Define this macro if the target machine has register windows. This C expression returns the register number as seen by the calling function corresponding to the register number IN as seen by the called function. Return IN if register number IN is not an inbound register. automatically generated by info2www version 1.2.2.9 |