123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822 |
- Info file internals, produced by texinfo-format-buffer -*-Text-*-
- from file internals.texinfo
- This file documents the internals of the GNU compiler.
- Copyright (C) 1987 Richard M. Stallman.
- Permission is granted to make and distribute verbatim copies of
- this manual provided the copyright notice and this permission notice
- are preserved on all copies.
- Permission is granted to copy and distribute modified versions of this
- manual under the conditions for verbatim copying, provided also that the
- section entitled "GNU CC General Public License" is included exactly as
- in the original, and provided that the entire resulting derived work is
- distributed under the terms of a permission notice identical to this one.
- Permission is granted to copy and distribute translations of this manual
- into another language, under the above conditions for modified versions,
- except that the section entitled "GNU CC General Public License" may be
- included in a translation approved by the author instead of in the original
- English.
- File: internals Node: Dependent Patterns, Prev: Standard Names, Up: Machine Desc
- Patterns Require Other Patterns
- ===============================
- Every machine description must have a named pattern for each of the
- conditional branch names `bCOND'. The recognition template
- must always have the form
- (set (pc)
- (if_then_else (COND (cc0) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))
- In addition, every machine description must have an anonymous pattern
- for each of the possible reverse-conditional branches. These patterns
- look like
- (set (pc)
- (if_then_else (COND (cc0) (const_int 0))
- (pc)
- (label_ref (match_operand 0 "" ""))))
- They are necessary because jump optimization can turn direct-conditional
- branches into reverse-conditional branches.
- The compiler does more with RTL than just create it from patterns
- and recognize the patterns: it can perform arithmetic expression codes
- when constant values for their operands can be determined. As a result,
- sometimes having one pattern can require other patterns. For example, the
- Vax has no `and' instruction, but it has `and not' instructions. Here
- is the definition of one of them:
- (define_insn "andcbsi2"
- [(set (match_operand:SI 0 "general_operand" "")
- (and:SI (match_dup 0)
- (not:SI (match_operand:SI
- 1 "general_operand" ""))))]
- ""
- "bicl2 %1,%0")
- If operand 1 is an explicit integer constant, an instruction constructed
- using that pattern can end up looking like
- (set (reg:SI 41)
- (and:SI (reg:SI 41)
- (const_int 0xffff7fff)))
- (where the integer constant is the one's complement of what
- appeared in the original instruction).
- To avoid a fatal error, the compiler must have a pattern that recognizes
- such an instruction. Here is what is used:
- (define_insn ""
- [(set (match_operand:SI 0 "general_operand" "")
- (and:SI (match_dup 0)
- (match_operand:SI 1 "general_operand" "")))]
- "GET_CODE (operands[1]) == CONST_INT"
- "*
- { operands[1]
- = gen_rtx (CONST_INT, VOIDmode, ~INTVAL (operands[1]));
- return \"bicl2 %1,%0\";
- }")
- Whereas a pattern to match a general `and' instruction is impossible to
- support on the Vax, this pattern is possible because it matches only a
- constant second argument: a special case that can be output as an `and not'
- instruction.
- File: internals Node: Machine Macros, Prev: Machine Desc, Up: Top
- Machine Description Macros
- **************************
- The other half of the machine description is a C header file conventionally
- given the name `tm-MACHINE.h'. The file `tm.h' should be a
- link to it. The header file `config.h' includes `tm.h' and most
- compiler source files include `config.h'.
- * Menu:
- * Run-time Target:: Defining -m switches like -m68000 and -m68020.
- * Storage Layout:: Defining sizes and alignments of data types.
- * Registers:: Naming and describing the hardware registers.
- * Register Classes:: Defining the classes of hardware registers.
- * Stack Layout:: Defining which way the stack grows and by how much.
- * Addressing Modes:: Defining addressing modes valid for memory operands.
- * Condition Code:: Defining how insns update the condition code.
- * Assembler Format:: Defining how to write insns and pseudo-ops to output.
- * Misc:: Everything else.
- File: internals Node: Run-time Target, Prev: Machine Macros, Up: Machine Macros, Next: Storage Layout
- Run-time Target Specification
- =============================
- `CPP_PREDEFINES'
- Define this to be a string constant containing `-D' switches
- to define the predefined macros that identify this machine and system.
-
- For example, on the Sun, one can use the value
-
- "-Dmc68000 -Dsun"
-
- `extern int target_flags;'
- This declaration should be present.
-
- `TARGET_...'
- This series of macros is to allow compiler command arguments to
- enable or disable the use of optional features of the target machine.
- For example, one machine description serves both the 68000 and
- the 68020; a command argument tells the compiler whether it should
- use 68020-only instructions or not. This command argument works
- by means of a macro `TARGET_68020' that tests a bit in
- `target_flags'.
-
- Define a macro `TARGET_FEATURENAME' for each such option.
- Its definition should test a bit in `target_flags'; for example:
-
- #define TARGET_68020 (target_flags & 1)
-
- One place where these macros are used is in the condition-expressions
- of instruction patterns. Note how `TARGET_68020' appears
- frequently in the 68000 machine description file, `m68000.md'.
- Another place they are used is in the definitions of the other
- macros in the `tm-MACHINE.h' file.
-
- `TARGET_SWITCHES'
- This macro defines names of command switches to set and clear
- bits in `target_flags'. Its definition is an initializer
- with a subgrouping for each command switches.
-
- Each subgrouping contains a string constant, that defines the switch
- name, and a number, which contains the bits to set in
- `target_flags'. A negative number says to clear bits instead;
- the negative of the number is which bits to clear. The actual switch
- name is made by appending `-m' to the specified name.
-
- One of the subgroupings should have a null string. The number in
- this grouping is the default value for `target_flags'. Any
- target switches act starting with that value.
-
- Here is an example which defines `-m68000' and `-m68020'
- with opposite meanings, and picks the latter as the default:
-
- #define TARGET_SWITCHES \
- { { "68020", 1}, \
- { "68000", -1}, \
- { "", 1}}
- File: internals Node: Storage Layout, Prev: Run-time Target, Up: Machine Macros, Next: Registers
- Storage Layout
- ==============
- `BITS_BIG_ENDIAN'
- Define this macro if the most significant bit in a byte has the lowest
- number. This means that bit-field instructions count from the most
- significant bit. If the machine has no bit-field instructions, this
- macro is irrelevant.
-
- `BYTES_BIG_ENDIAN'
- Define this macro if the most significant byte in a word has the
- lowest number.
-
- `WORDS_BIG_ENDIAN'
- Define this macro if, in a multiword object, the most signficant
- word has the lowest number.
-
- `BITS_PER_UNIT'
- Number of bits in an addressable storage unit (byte); normally 8.
-
- `BITS_PER_WORD'
- Number of bits in a word; normally 32.
-
- `UNITS_PER_WORD'
- Number of storage units in a word; normally 4.
-
- `POINTER_SIZE'
- Width of a pointer, in bits.
-
- `PARM_BOUNDARY'
- Alignment required for pointers, in bits.
-
- `FUNCTION_BOUNDARY'
- Alignment required for a function entry point, in bits.
-
- `BIGGEST_ALIGNMENT'
- Biggest alignment that anything can require on this machine, in bits.
-
- `STRICT_ALIGNMENT'
- Define this if instructions will fail to work if given data not
- on the nominal alignment. If instructions will merely go slower
- in that case, do not define this macro.
- File: internals Node: Registers, Prev: Storage Layout, Up: Machine Macros, Next: Register Classes
- Register Usage
- ==============
- `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 number7
- `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 inclue the stack pointer, the frame
- pointer, 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
-
- `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 registers 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_REGS (REGNO, MODE)'
- A C expression for the number of consecutive hard registers, starting
- at register number REGNO, required to hold a value of mode
- MODE.
-
- On a machine where all registers are exactly one word, a suitable
- definition of this macro is
-
- #define HARD_REGNO_NREGS(REGNO, MODE) \
- ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
- / UNITS_PER_WORD))
-
- `HARD_REGNO_MODE_OK (REGNO, MODE)'
- A C expression that is nonzero if it is permissible to store a value
- of mode MODE in hard register number REGNO (or in several
- registers starting with that one). For a machine where all registers
- are equivalent, a suitable definition is
-
- #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
-
- It is not necessary for this macro to check for fixed register numbers
- because the allocation mechanism considers them to be always occupied.
-
- `MODES_TIEABLE_P (MODE1, MODE2)'
- A C expression that is nonzero if it is desirable to choose register
- allocation so as to avoid move instructions between a value of mode
- MODE1 and a value of mode MODE2.
-
- If `HARD_REGNO_MODE_OK (R, MODE1)' and
- `HARD_REGNO_MODE_OK (R, MODE2)' are ever different
- for any R, then `MODES_TIEABLE_P (MODE1,
- MODE2)' must be zero.
-
- `PC_REGNUM'
- If the program counter has a register number, define this as that
- register number. Otherwise, do not define it.
-
- `STACK_POINTER_REGNUM'
- The register number of the stack pointer register, which must also be
- a fixed register according to `FIXED_REGISTERS'. On many
- machines, the hardware determines which register this is.
-
- `FRAME_POINTER_REGNUM'
- The register number of the frame pointer register, which is used to
- access automatic variables in the stack frame. It must also described
- in `FIXED_REGISTERS' as a fixed register. On some machines, the
- hardware determines which register this is. On other machines, you
- can choose any register you wish for this purpose.
-
- `ARG_POINTER_REGNUM'
- The register number of the arg pointer register, which is used to
- access the function's argument list. On some machines, this is the
- same as the frame pointer register. On some machines, the hardware
- determines which register this is. On other machines, you can choose
- any register you wish for this purpose. It must in any case be a
- fixed register according to `FIXED_REGISTERS'.
-
- `STATIC_CHAIN_REGNUM'
- The register number used for passing a function's static chain
- pointer. This is needed for languages such as Pascal and Algol where
- functions defined within other functions can access the local
- variables of the outer functions; it is not currently used because C
- does not provide this feature.
-
- The static chain register need not be a fixed register.
-
- `FUNCTION_VALUE_REGNUM'
- The register number used for returning values from a function. This
- must be one of the call-used registers (since function calls alter
- it!) but should not be a fixed register. When the value being
- returned has a multi-word machine mode, multiple consecutive registers
- starting with the specified one are used.
-
- `STRUCT_VALUE_REGNUM'
- When a function's value's mode is `BLKmode', the value is not returned
- in the register `FUNCTION_VALUE_REGNUM'. Instead, the caller passes
- the address of a block of memory in which the value should be stored.
- `STRUCT_VALUE_REGNUM' is the register in which this address is passed.
- File: internals Node: Register Classes, Prev: Registers, Up: Machine Macros, Next: Stack Layout
- Register Classes
- ================
- On many machines, the numbered registers are not all equivalent.
- For example, certain registers may not be allowed for indexed addressing;
- certain registers may not be allowed in some instructions. These machine
- restrictions are described to the compiler using "register classes".
- You define a number of register classes, giving each one a name and saying
- which of the registers belong to it. Then you can specify register classes
- that are allowed as operands to particular instruction patterns.
- In general, each register will belong to several classes. In fact, one
- class must be named `ALL_REGS' and contain all the registers. Another
- class must be named `NO_REGS' and contain no registers. Often the
- union of two classes will be another class; however, this is not required.
- One of the classes must be named `GENERAL_REGS'. There is nothing
- terribly special about the name, but the operand constraint letters
- `r' and `g' specify this class. If `GENERAL_REGS' is
- the same as `ALL_REGS', just define it as a macro which expands
- to `ALL_REGS'.
- The way classes other than `GENERAL_REGS' are specified in operand
- constraints is through machine-dependent operand constraint letters.
- You can define such letters to correspond to various classes, then use
- them in operand constraints.
- You must also specify certain redundant information about the register
- classes: for each class, which classes contain it and which ones are
- contained in it; for each pair of classes, the largest class contained
- in their union.
- `enum reg_class'
- An enumeral type that must be defined with all the register class names
- as enumeral values. `NO_REGS' must be first. `ALL_REGS'
- must be the last register class, followed by one more enumeral value,
- `LIM_REG_CLASSES', which is not a register class but rather
- tells how many classes there are.
-
- Each register class has a number, which is the value of casting
- the class name to type `int'. The number serves as an index
- in many of the tables described below.
-
- `REG_CLASS_NAMES'
- An initializer containing the names of the register classes as C string
- constants. These names are used in writing some of the debugging dumps.
-
- `REG_CLASS_CONTENTS'
- An initializer containing the contents of the register classes, as integers
- which are bit masks. The Nth integer specifies the contents of class
- N. The way the integer MASK is interpreted is that
- register R is in the class if `MASK & (1 << R)' is 1.
-
- When the machine has more than 32 registers, an integer does not suffice.
- Then the integers are replaced by sub-initializers, braced groupings containing
- several integers. Each sub-initializer must be suitable as an initializer
- for the type `HARD_REG_SET' which is defined in `hard-reg-set.h'.
-
- `REGNO_REG_CLASS (REGNO)'
- A C expression whose value is a register class containing hard register
- REGNO. In general there is more that one such class; choose a class
- which is "minimal", meaning that no smaller class also contains the
- register.
-
- `REG_CLASS_SUPERCLASSES'
- A two-level initializer that says, for each class, which classes contain
- it. The Nth element of the initializer is a sub-initializer for
- class N; it contains the names of the othe classes that contain class
- N (but not the name of class N itself), followed by
- `LIM_REG_CLASSES' to mark the end of the element.
-
- `REG_CLASS_SUBCLASSES'
- Similar to `REG_CLASS_SUPERCLASSES', except that element N lists
- the classes *contained in* class N, followed once again by
- `LIM_REG_CLASSES' to mark the end of the element.
-
- `REG_CLASS_SUBUNION'
- An two-level initializer for a two-dimensional array. The element
- (M, N) of this array must be a class that is "close to"
- being the union of classes M and N. If there is a class
- that is exactly that union, use it; otherwise, choose some smaller
- class, preferably as large as possible but certainly not containing
- any register that is neither in class M nor in class N.
-
- `INDEX_REG_CLASS'
- A macro whose definition is the name of the class to which a valid index
- register must belong.
-
- `REG_CLASS_FROM_LETTER (CHAR)'
- A C expression which defines the machine-dependent operand constraint
- letters for register classes. If CHAR is such a letter, the value
- should be the register class corresponding to it. Otherwise, the value
- should be `NO_REGS'.
-
- `REGNO_OK_FOR_CLASS_P (REGNO, CLASS)'
- A C expression which is nonzero if register number REGNO is a hard
- register belonging to class CLASS. The expression is always zero if
- REGNO is a pseudo register.
-
- `REG_OK_FOR_CLASS_P (REG, CLASS)'
- A C expression which is nonzero if REG (an rtx assumed to have
- code `reg') belongs to class CLASS.
-
- What about pseudo registers? There are two alternatives, and the machine
- description header file must be able to do either one on command. If the
- macro `REG_OK_STRICT' is defined, this macro should be defined to
- reject all pseudo registers (return 0 for them). Otherwise, this macro
- should be defined to accept all pseudo registers (return 1 for them).
-
- Some source files of the compiler define `REG_OK_STRICT' before
- including the machine description header file, while others do not,
- according to the needs of that part of the compiler.
-
- `PREFERRED_RELOAD_CLASS (X, CLASS)'
- A C expression that places additional restrictions on the register class
- to use when it is necessary to copy value X into a register in class
- CLASS. The value is a register class; perhaps CLASS, or perhaps
- another, smaller class. CLASS is always safe as a value. In fact,
- the definition
-
- #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
-
- is always safe. However, sometimes returning a more restrictive class
- makes better code. For example, on the 68000, when X is an
- integer constant that is in range for a `moveq' instruction,
- the value of this macro is always `DATA_REGS' as long as
- CLASS includes the data registers. Requiring a data register
- guarantees that a `moveq' will be used.
- Two other special macros
- `CONST_OK_FOR_LETTER_P (VALUE, C)'
- A C expression that defines the machine-dependent operand constraint letters
- that specify particular ranges of integer values. If C is one
- of those letters, the expression should check that VALUE, an integer,
- is in the appropriate range and return 1 if so, 0 otherwise. If C is
- not one of those letters, the value should be 0 regardless of VALUE.
-
- `CONST_DOUBLE_OK_FOR_LETTER_P (VALUE, C)'
- A C expression that defines the machine-dependent operand constraint
- letters that specify particular ranges of floating values. If C is
- one of those letters, the expression should check that VALUE, an rtx
- of code `const_double', is in the appropriate range and return 1 if
- so, 0 otherwise. If C is not one of those letters, the value should
- be 0 regardless of VALUE.
- File: internals Node: Stack Layout, Prev: Register Classes, Up: Machine Macros, Next: Addressing Modes
- Describing Stack Layout
- =======================
- `STACK_GROWS_DOWNWARD'
- Define this macro if pushing a word onto the stack moves the stack
- pointer to a smaller address. The definition is irrelevant because the
- compiler checks this macro with `#ifdef'.
-
- `FRAME_GROWS_DOWNWARD'
- Define this macro if the addresses of local variable slots are at negative
- offsets from the frame pointer.
-
- `STARTING_FRAME_OFFSET'
- Offset from the frame pointer to the first local variable slot to be allocated.
-
- If `FRAME_GROWS_DOWNWARD', the next slot's offset is found by
- subtracting the length of the first slot from `STARTING_FRAME_OFFSET'.
- Otherwise, it is found by adding the length of the first slot to
- the value `STARTING_FRAME_OFFSET'.
-
- `PUSH_ROUNDING (NPUSHED)'
- A C expression that is the number of bytes actually pushed onto the
- stack when an instruction attempts to push NPUSHED bytes.
-
- On some machines, the definition
-
- #define PUSH_ROUNDING(BYTES) (BYTES)
-
- will suffice. But on other machines, instructions that appear
- to push one byte actually push two bytes in an attempt to maintain
- alignment. Then the definition should be
-
- #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)
-
- `FIRST_PARM_OFFSET'
- Offset from the argument pointer register to the first argument's address.
-
- `RETURN_POPS_ARGS'
- Define this macro if returning from a function automatically pops the
- function's arguments. Do not define it if the caller must pop them.
-
- `FUNCTION_PROLOGUE (FILE, SIZE)'
- A C compound statement that outputs the assembler code for entry to a
- function. The prologue is responsible for setting up the stack frame,
- initializing the frame pointer register, saving registers that must be
- saved, and allocating SIZE additional bytes of storage for the local
- variables. SIZE is an integer. FILE is a stdio stream to
- which the assembler code should be output.
-
- The label for the beginning of the function need not be output by this
- macro. That has already been done when the macro is run.
-
- To determine which registers to save, the macro can refer to the array
- `regs_ever_live': element R is nonzero if hard register R
- is used anywhere within the function. This implies the function prologue
- should save register R, but not if it is one of the call-used
- registers.
-
- `FUNCTION_EPILOGUE (FILE, SIZE)'
- A C compound statement that outputs the assembler code for exit from a
- function. The epilogue is responsible for restoring the saved
- registers and stack pointer to their values when the function was
- called, and returning control to the caller. This macro takes the
- same arguments as the macro `FUNCTION_PROLOGUE', and the
- registers to restore are determined from `regs_ever_live' and
- `CALL_USED_REGISTERS' in the same way.
-
- On some machines, there is a single instruction that does all the work of
- returning from the function. On these machines, give that instruction the
- name `return' and do not define the macro `FUNCTION_EPILOGUE' at
- all.
- File: internals Node: Addressing Modes, Prev: Stack Layout, Up: Machine Macros, Next: Misc
- Addressing Modes
- ================
- `HAVE_POST_INCREMENT'
- Define this macro if the machine supports post-increment addressing.
-
- `HAVE_PRE_INCREMENT'
- `HAVE_POST_DECREMENT'
- `HAVE_PRE_DECREMENT'
- Similar for other kinds of addressing.
-
- `CONSTANT_ADDRESS_P (X)'
- A C expression that is 1 if the rtx X is a constant whose value
- is an integer. This includes integers whose values are not explicitly
- known, such as `symbol_ref' and `label_ref' expressions
- and `const' arithmetic expressions.
-
- `MAX_REGS_PER_ADDRESS'
- A number, the maximum number of registers that can appear in a valid
- memory address.
-
- `GO_IF_LEGITIMATE_ADDRESS (MODE, X, LABEL)'
- A C compound statement with a conditional `goto LABEL;'
- executed if X (an rtx) is a legitimate memory address on
- the target machine for a memory operand of mode MODE.
-
- It usually pays to define several simpler macros to serve as
- subroutines for this one. Otherwise it may be too complicated
- to understand.
-
- `LEGITIMIZE_ADDRESS (X, OLDX, MODE, WIN)'
- A C compound statement that attempts to replace X with a valid
- memory address for an operand of mode MODE. WIN will be
- a C statement label elsewhere in the code; the macro definition
- may use
-
- GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
-
- to avoid further processing if the address has become legitimate.
-
- X will always be the result of a call to `break_out_memory_refs',
- and OLDX will be the operand that was given to that function to produce
- X.
-
- The code generated by this macro should not alter the substructure of X.
- If it transforms X into a more legitimate form, it should assign X
- (which will always be a C variable) a new value.
-
- It is not necessary for this macro to come up with a legitimate address.
- The compiler has standard ways of doing so in all cases. In fact, it is
- safe for this macro to do nothing. But often a machine-dependent strategy
- can generate better code.
- File: internals Node: Misc, Prev: Addressing Modes, Up: Machine Macros, Next: Condition Code
- Miscellaneous Parameters
- ========================
- `CASE_VECTOR_MODE'
- An alias for a machine mode name. This is the machine mode that elements
- of a jump-table should have.
-
- `CASE_VECTOR_PC_RELATIVE'
- Define this macro if jump-tables should contain relative addresses.
-
- `IMPLICIT_FIX_EXPR'
- An alias for a tree code that should be used by default for conversion
- of floating point values to fixed point. Normally, `FIX_ROUND_EXPR'
- is used.
-
- `EASY_DIV_EXPR'
- An alias for a tree code that is the easiest kind of division to compile
- code for in the general case. It may be `TRUNC_DIV_EXPR',
- `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.
- These differ in how they round the result to an integer.
- `EASY_DIV_EXPR' is used when it is permissible to use any of those
- kinds of division and the choice should be made on the basis of efficiency.
-
- `MOVE_MAX'
- The maximum number of bytes that a single instruction can move quickly
- from memory to memory.
-
- `SLOW_ZERO_EXTEND'
- Define this macro if zero-extension (of chars or shorts to integers)
- can be done faster if the destination is a register that is known to be zero.
-
- `SHIFT_COUNT_TRUNCATED'
- Define this macro if shift instructions ignore all but the lowest few
- bits of the shift count. It implies that a sign-extend or zero-extend
- instruction for the shift count can be omitted.
-
- `TRULY_NOOP_TRUNCATON (OUTPREC, INPREC)'
- A C expression which is nonzero if on this machine it is safe to
- "convert" an integer of INPREC bits to one of OUTPREC bits
- (where OUTPREC is smaller than INPREC) by merely operating
- on it as if it had only INPREC bits.
-
- On many machines, this expression can be 1.
-
- `Pmode'
- An alias for the machine mode for pointers. Normally the definition can be
-
- #define Pmode SImode
-
- `FUNCTION_MODE'
- An alias for the machine mode used for memory references to functions being
- called, in `call' RTL expressions. On most machines this should be
- `QImode'.
-
- `CONST_COST (X, CODE)'
- A part of a C `switch' statement that describes the relative costs of
- constant RTL expressions. It must contain `case' labels for
- expression codes `const_int', `const', `symbol_ref',
- `label_ref' and `const_double'. Each case must ultimately reach
- a `return' statement to return the relative cost of the use of that
- kind of constant value in an expression. The cost may depend on the
- precise value of the constant, which is available for examination in
- X.
-
- CODE is the expression code---redundant, since it can be obtained with
- `GET_CODE (X)'.
- File: internals Node: Condition Code, Prev: Misc, Up: Machine Macros, Next: Assembler Format
- Condition Code Information
- ==========================
- The file `conditions.h' defines a variable `cc_status' to
- describe how the condition code was computed (in case the interpretation of
- the condition code depends on the instruction that it was set by). This
- variable contains the RTL expressions on which the condition code is
- currently based, and several standard flags.
- Sometimes additional machine-specific flags must be defined in the machine
- description header file. It can also add additional machine-specific
- information by defining `CC_STATUS_MDEP'.
- `CC_STATUS_MDEP'
- A type, with which the `mdep' component of `cc_status' should
- be declared. It defaults to `int'.
-
- `CC_STATUS_MDEP_INIT'
- A C expression for the initial value of the `mdep' field.
- It defaults to 0.
-
- `NOTICE_UPDATE_CC (EXP)'
- A C compound statement to set the components of `cc_status'
- appropriately for an insn whose body is EXP. It is this
- macro's responsibility to recognize insns that set the condition code
- as a byproduct of other activity as well as those that explicitly
- set `(cc0)'.
-
- If there are insn that do not set the condition code but do alter other
- machine registers, this macro must check to see whether they invalidate the
- expressions that the condition code is recorded as reflecting. For
- example, on the 68000, insns that store in address registers do not set the
- condition code, which means that usually `NOTICE_UPDATE_CC' can leave
- `cc_status' unaltered for such insns. But suppose that the previous
- insn set the condition code based on location `a4@(102)' and the
- current insn stores a new value in `a4'. Although the condition code
- is not changed by this, it will no longer be true that it reflects the
- contents of `a4@(102)'. Therefore, `NOTICE_UPDATE_CC' must alter
- `cc_status' in this case to say that nothing is known about the
- condition code value.
- File: internals Node: Assembler Format, Prev: Condition Code, Up: Machine Macros
- Output of Assembler Code
- ========================
- `TEXT_SECTION_ASM_OP'
- A C string constant for the assembler operation that should precede
- instructions and read-only data. Normally `".text"' is right.
-
- `DATA_SECTION_ASM_OP'
- A C string constant for the assembler operation to identify the following
- data as writable initialized data. Normally `".data"' is right.
-
- `REGISTER_NAMES'
- A C initializer containing the assembler's names for the machine registers,
- each one as a C string constant. This is what translates register numbers
- in the compiler into assembler language.
-
- `DBX_REGISTER_NUMBER (REGNO)'
- A C expression that returns the DBX register number for the compiler register
- number REGNO. In simple cases, the value of this expression may be
- REGNO itself. But sometimes there are some registers that the compiler
- knows about and DBX does not, or vice versa. In such cases, some register
- may need to have one number in the compiler and another for DBX.
-
- `ASM_OUTPUT_DOUBLE (FILE, VALUE)'
- A C statement to output to the stdio stream FILE an assembler
- instruction to assemble a `double' constant whose value is
- VALUE. VALUE will be a C expression of type `double'.
-
- `ASM_OUTPUT_FLOAT (FILE, VALUE)'
- A C statement to output to the stdio stream FILE an assembler
- instruction to assemble a `float' constant whose value is VALUE.
- VALUE will be a C expression of type `float'.
-
- `ASM_OUTPUT_SKIP (FILE, NBYTES)'
- A C statement to output to the stdio stream FILE an assembler
- instruction to advance the location counter by NBYTES bytes.
- NBYTES will be a C expression of type `int'.
-
- `ASM_OUTPUT_ALIGN (FILE, POWER)'
- A C statement to output to the stdio stream FILE an assembler
- instruction to advance the location counter to a multiple of 2 to the
- POWER bytes. POWER will be a C expression of type `int'.
-
- `ASM_INT_OP'
- A C string constant for the assembler operation that assembles constants of
- C type `int'. A space must follow the operation name. Normally
- `".long "'.
-
- `ASM_SHORT_OP'
- `ASM_CHAR_OP'
- Likewise, for C types `short' and `char'. Normally `".word "'
- and `".byte "'.
-
- `TARGET_BELL'
- A C constant expression for the integer value for escape sequence `\a'.
-
- `TARGET_BS'
- `TARGET_TAB'
- `TARGET_NEWLINE'
- C constant expressions for the integer values for escape sequences
- `\b', `\t' and `\n'.
-
- `TARGET_VT'
- `TARGET_FF'
- `TARGET_CR'
- C constant expressions for the integer values for escape sequences
- `\v', `\f' and `\r'.
-
- `PRINT_OPERAND (FILE, X)'
- A C compound statement to output to stdio stream FILE
- the assembler syntax for an instruction operand X.
- X is an RTL expression.
-
- If X is a register, this macro should print the register's name. The
- names can be found in an array `reg_names' whose type is `char
- *[]'. `reg_names' is initialized from `REGISTER_NAMES'.
-
- `PRINT_OPERAND_ADDRESS (FILE, X)'
- A C compound statement to output to stdio stream FILE the assembler
- syntax for an instruction operand that is a memory reference whose address
- is X. X is an RTL expression.
|