Annotation of researchv10dc/cmd/gcc/conditions.h, revision 1.1.1.1

1.1       root        1: /* Definitions for condition code handling in final.c and output routines.
                      2:    Copyright (C) 1987 Free Software Foundation, Inc.
                      3: 
                      4: This file is part of GNU CC.
                      5: 
                      6: GNU CC is distributed in the hope that it will be useful,
                      7: but WITHOUT ANY WARRANTY.  No author or distributor
                      8: accepts responsibility to anyone for the consequences of using it
                      9: or for whether it serves any particular purpose or works at all,
                     10: unless he says so in writing.  Refer to the GNU CC General Public
                     11: License for full details.
                     12: 
                     13: Everyone is granted permission to copy, modify and redistribute
                     14: GNU CC, but only under the conditions described in the
                     15: GNU CC General Public License.   A copy of this license is
                     16: supposed to have been given to you along with GNU CC so you
                     17: can know your rights and responsibilities.  It should be in a
                     18: file named COPYING.  Among other things, the copyright notice
                     19: and this notice must be preserved on all copies.  */
                     20: 
                     21: 
                     22: /* The variable cc_status says how to interpret the condition code.
                     23:    It is set by output routines for an instruction that sets the cc's
                     24:    and examined by output routines for jump instructions.
                     25: 
                     26:    cc_status contains two components named `value1' and `value2'
                     27:    that record two equivalent expressions for the values that the
                     28:    condition codes were set from.  (Either or both may be null if
                     29:    there is no useful expression to record.)  These fields are
                     30:    used for eliminating redundant test and compare instructions
                     31:    in the cases where the condition codes were already set by the
                     32:    previous instruction.
                     33: 
                     34:    cc_status.flags contains flags which say that the condition codes
                     35:    were set in a nonstandard manner.  The output of jump instructions
                     36:    uses these flags to compensate and produce the standard result
                     37:    with the nonstandard condition codes.  Standard flags are defined here.
                     38:    The tm- file can also define other machine-dependent flags.
                     39: 
                     40:    cc_status also contains a machine-dependent component `mdep'
                     41:    whose type, `CC_STATUS_MDEP', may be defined as a macro in the
                     42:    tm- file.  */
                     43: 
                     44: #ifndef CC_STATUS_MDEP
                     45: #define CC_STATUS_MDEP int
                     46: #endif
                     47: 
                     48: #ifndef CC_STATUS_MDEP_INIT
                     49: #define CC_STATUS_MDEP_INIT 0
                     50: #endif
                     51: 
                     52: typedef struct {int flags; rtx value1, value2; CC_STATUS_MDEP mdep;} CC_STATUS;
                     53: 
                     54: /* While outputting an insn as assembler code,
                     55:    this is the status BEFORE that insn.  */
                     56: extern CC_STATUS cc_prev_status;
                     57: 
                     58: /* While outputting an insn as assembler code,
                     59:    this is being altered to the status AFTER that insn.  */
                     60: extern CC_STATUS cc_status;
                     61: 
                     62: /* These are the machine-independent flags:  */
                     63: 
                     64: /* Set if the sign of the cc value is inverted:
                     65:    output a following jump-if-less as a jump-if-greater, etc.  */
                     66: #define CC_REVERSED 1
                     67: 
                     68: /* This bit means that the current setting of the N bit is bogus
                     69:    and conditional jumps should use the Z bit in its place.
                     70:    This state obtains when an extraction of a signed single-bit field
                     71:    or an arithmetic shift right of a byte by 7 bits
                     72:    is turned into a btst, because btst does not set the N bit.  */
                     73: #define CC_NOT_POSITIVE 2
                     74: 
                     75: /* This bit means that the current setting of the N bit is bogus
                     76:    and conditional jumps should pretend that the N bit is clear.
                     77:    Used after extraction of an unsigned bit
                     78:    or logical shift right of a byte by 7 bits is turned into a btst.
                     79:    The btst does not alter the N bit, but the result of that shift
                     80:    or extract is never negative.  */
                     81: #define CC_NOT_NEGATIVE 4
                     82: 
                     83: /* This bit means that the current setting of the overflow flag
                     84:    is bogus and conditional jumps should pretend there is no overflow.  */
                     85: #define CC_NO_OVERFLOW 010
                     86: 
                     87: /* This bit means that what ought to be in the Z bit
                     88:    should be tested as the complement of the N bit.  */
                     89: #define CC_Z_IN_NOT_N 020
                     90: 
                     91: /* This is how to initialize the variable cc_status.
                     92:    final does this at appropriate moments.  */
                     93: 
                     94: #define CC_STATUS_INIT  \
                     95:  (cc_status.flags = 0, cc_status.value1 = 0, cc_status.value2 = 0,  \
                     96:   CC_STATUS_MDEP_INIT)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.