⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ic.h

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/****************************************************************************
*
*                            Open Watcom Project
*
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
*  ========================================================================
*
*    This file contains Original Code and/or Modifications of Original
*    Code as defined in and that are subject to the Sybase Open Watcom
*    Public License version 1.0 (the 'License'). You may not use this file
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
*    provided with the Original Code and Modifications, and is also
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
*               DESCRIBE IT HERE!
*
****************************************************************************/


// IC.H -- intermediate code definitions
//
// note: this file is never included directly from a module
//
//  ICODES.H  -- enumerates the code
//  INAMES.H  -- generates a vector of opcode names
//  ITYPVEC.H -- generates a vector of opcode types
//
//
//
// 91/06/10 -- J.W.Welch        -- defined

//
// The "//|" comments apply to the IC code immediately preceeding it.
// The ICMASK program will scan these comments for ids that
// should be used when building a set of operator masks for
// each operator.  The comment can be omitted if no masks have
// to be specified for the IC code.  They can also be repeated
// if more room is necessary to specify more ids.
//

// example:
//
// { IC( IC_EOF, NUL )             // - end of virtual file (used internally)
// //| MASK1 MASK2 MASK3
// //| MASK4

                                // Control Codes:
                                //------------------------------------------
{ IC( IC_EOF, NUL )             // - end of virtual file (used internally)
, IC( IC_NEXT, BIN )            // - next block (used internally)
, IC( IC_DEF_SEG, BIN )         // - specify current segment (used internally)
, IC( IC_NO_OP, NUL )           // - no operation
, IC( IC_DTOR_DLT_BEG, NUL )    // - DELETE code in DTOR: start
, IC( IC_DTOR_DLT_END, NUL )    // - DELETE code in DTOR: end
, IC( IC_DTOR_DAR_BEG, NUL )    // - DELETE-ARRAY code in DTOR: start
, IC( IC_DTOR_DAR_END, NUL )    // - DELETE-ARRAY code in DTOR: end
, IC( IC_CTOR_COMP_BEG, NUL )   // - CTOR componentry: start
, IC( IC_CTOR_COMP_END, NUL )   // - CTOR componentry: end
, IC( IC_PCH_STOP, NUL )        // - mark end of CGFILE that was in progress
, IC( IC_ZAP1_REF, NUL )        // - previous instr is zap #1's reference instr
, IC( IC_ZAP2_REF, NUL )        // - previous instr is zap #2's reference instr

                                // Label Codes:
                                //------------------------------------------
, IC( IC_LABGET_CS, BIN )       // - get a control-sequence label
, IC( IC_LABGET_GOTO, BIN )     // - get a number of GOTO labels
, IC( IC_LABFREE_CS, BIN )      // - free a control-sequence label
, IC( IC_LABEL_CS, BIN )        // - set label for GOTO_NEAR
, IC( IC_LABEL_GOTO, BIN )      // - set label for GOTO_NEAR
, IC( IC_LABDEF_CS, BIN )       // - define control-sequence label
, IC( IC_LABDEF_GOTO, BIN )     // - define goto label
, IC( IC_GOTO_NEAR, BIN )       // - goto near label (conditional,unconditional)
//| OE_COUNT
, IC( IC_SWITCH_BEG, NUL )      // - switch: start
//| OE_COUNT
, IC( IC_SWITCH_END, NUL )      // - switch: end
//| OE_COUNT
, IC( IC_SWITCH_CASE, BIN )     // - switch: case
//| OE_COUNT
, IC( IC_SWITCH_DEFAULT, NUL )  // - switch: default ( from code )
//| OE_COUNT
, IC( IC_SWITCH_OUTSIDE, BIN )  // - switch: default ( generated )
//| OE_COUNT

                                // Primitive (leaf) Codes:
                                //------------------------------------------
, IC( IC_LEAF_CONST_INT, BIN )  // - leaf: integer constant
//| OE_COUNT
, IC( IC_LEAF_CONST_INT64, CON )// - leaf: int-64 constant
//| OE_COUNT
, IC( IC_LEAF_CONST_FLT, CON )  // - leaf: floating-point constant
//| OE_COUNT
, IC( IC_LEAF_NAME_FRONT, SYM ) // - leaf: front-end name
//| OE_COUNT
, IC( IC_LEAF_CONST_STR, STR )  // - leaf: string constant
//| OE_COUNT
, IC( IC_LEAF_THIS, NUL )       // - leaf: "this" pointer for function
//| OE_COUNT
, IC( IC_LEAF_CDTOR_EXTRA, NUL )// - leaf: extra int parm for ctor/dtor
//| OE_COUNT

                                // Expression-control Codes:
                                //------------------------------------------
, IC( IC_SET_TYPE, TYP )        // - set type for upcoming leaves, operations
, IC( IC_EXPR_TRASH, NUL )      // - trash expression
, IC( IC_EXPR_DONE, NUL )       // - expression is now completed
, IC( IC_EXPR_TEMP, NUL )       // - start expression with dtorable temporaries
, IC( IC_LVALUE_TYPE, TYP )     // - set lvalue type
, IC( IC_OPR_TERNARY, BIN )     // - ternary operations
//| OE_COUNT
, IC( IC_OPR_BINARY, BIN )      // - binary operations
//| OE_COUNT
, IC( IC_OPR_UNARY, BIN )       // - unary operations
//| OE_COUNT
, IC( IC_OPR_INDEX, BIN )       // - set type for indexing
, IC( IC_BIT_MASK, TYP )        // - specify bit mask
, IC( IC_COPY_OBJECT, TYP )     // - copy to object
//| OE_COUNT
, IC( IC_EXPR_TS, TYP )         // - type-signature referenced
, IC( IC_DTOR_REF, SYM )        // - destructor referenced in tables
, IC( IC_EXPR_CONST, NUL )      // - expression is constant
, IC( IC_EXPR_VOLAT, NUL )      // - expression is volatile

                                // Routine-calling Codes:
                                //------------------------------------------
, IC( IC_PROC_RETURN, NUL )     // - return
//| OE_COUNT
, IC( IC_CALL_PARM, NUL )       // - define parameter for call
//| OE_COUNT
, IC( IC_CALL_SETUP, SYM )      // - start of call (direct )
, IC( IC_CALL_EXEC, NUL )       // - execute call (direct)
//| OE_COUNT
, IC( IC_CALL_SETUP_IND, TYP )  // - start of call (direct )
, IC( IC_CALL_EXEC_IND, NUL )   // - execute call (indirect)
//| OE_COUNT
, IC( IC_VIRT_FUNC, SYM )       // - specify virtual function
, IC( IC_VFT_BEG, SYM )         // - start VFT definition
, IC( IC_VFT_REF, SYM )         // - current function references VFT

                                // Data-generation Codes:
                                //------------------------------------------
, IC( IC_DATA_LABEL, SYM )      // - indicate label (start of conglomerate)
, IC( IC_DATA_PTR_OFFSET, BIN ) // - set offset for use with IC_DATA_PTR_SYM
, IC( IC_DATA_PTR_SYM, SYM )    // - generate a pointer relative to symbol
, IC( IC_DATA_PTR_STR, STR )    // - generate a pointer to a string literal
, IC( IC_DATA_INT, BIN )        // - generate an integer
, IC( IC_DATA_INT64, CON )      // - generate an int-64 constant
, IC( IC_DATA_FLT, CON )        // - generate an floating value
, IC( IC_DATA_SIZE, BIN )       // - set size for following instruction
, IC( IC_DATA_TEXT, STR )       // - generate string (e.g., char a[] = "asdf";)
, IC( IC_DATA_REPLICATE, BIN )  // - replicate binary bytes
, IC( IC_DATA_UNDEF, BIN )      // - generate undefined data
, IC( IC_DATA_SEG, BIN )        // - adjust segment id for huge data
, IC( IC_DATA_SYMBOL, SYM )     // - generate for symbol

                                // Function-related Codes:
                                //------------------------------------------
, IC( IC_FUNCTION_OPEN, SYM )   // - open function scope
, IC( IC_FUNCTION_ARGS, SCP )   // - declare function arguments
//| OE_COUNT
, IC( IC_FUNCTION_EPILOGUE, NUL)// - start of function epilogue
, IC( IC_FUNCTION_CLOSE, NUL )  // - close function scope
, IC( IC_FUNCTION_DTM, BIN )    // - set dtor method for function
, IC( IC_DESTRUCT, SCP )        // - destruct up to given symbol
//| OE_COUNT
, IC( IC_FUNCTION_STAB, BIN )   // - function requires state table
, IC( IC_COND_TRUE, BIN )       // - start of TRUE part of conditional block
, IC( IC_COND_FALSE, BIN )      // - start of FALSE part of conditional block
, IC( IC_COND_END, BIN )        // - end of conditional block
, IC( IC_CTOR_COMPLETE, NUL )   // - CTOR has completed (before a return)
//| OE_COUNT
, IC( IC_DTOR_REG, NUL )        // - generate registration for DTOR
//| OE_COUNT
, IC( IC_DTOR_DEREG, NUL )      // - generate deregistration for DTOR
//| OE_COUNT
, IC( IC_DTOR_USE, SYM )        // - DTOR will be called (directly or by R/T)
, IC( IC_DTOR_SUBOBJS, NUL )    // - destruct sub-objects
, IC( IC_SET_TRY_STATE, SYM )   // - set function state variable to try
//| OE_COUNT
, IC( IC_RESET_THIS, BIN )      // - reset "this" when not inlined
//| OE_COUNT
, IC( IC_DTORABLE_INIT, NUL )   // - initialize DTORABLE object
//| OE_COUNT
, IC( IC_CTOR_CODE, NUL )       // - start of CTOR code
//| OE_COUNT
, IC( IC_DESTRUCT_VAR, SYM )    // - destruct until symbol
//| OE_COUNT
, IC( IC_SET_CATCH_STATE, NUL ) // - set state of catch
//| OE_COUNT
, IC( IC_GEN_CTOR_DISP, TYP )   // - generate ctor-disp init code for class
//| OE_COUNT
, IC( IC_EXACT_VPTR_INIT, BIN ) // - generate exact offset vptr init
//| OE_COUNT
, IC( IC_VBASE_VPTR_INIT, BIN ) // - generate vptr init in a vbase
//| OE_COUNT
, IC( IC_FUNCTION_RETN, SYM )   // - function return symbol

                                // Scope-related Codes:
                                //------------------------------------------
, IC( IC_BLOCK_OPEN, SCP )      // - open block scope
, IC( IC_BLOCK_CLOSE, NUL )     // - close block scope
, IC( IC_BLOCK_SRC, SCP )       // - set scope for source (for jump)
, IC( IC_BLOCK_DEAD, SCP )      // - start of block in dead-code
, IC( IC_BLOCK_DONE, NUL )      // - complete insignificant scope
, IC( IC_BLOCK_END, SCP )       // - end of block when dead code
, IC( IC_DTOR_AUTO, SYM )       // - register DTOR of auto symbol
//| OE_COUNT
, IC( IC_DTOR_STATIC, SYM )     // - register DTOR of static symbol
//| OE_COUNT
, IC( IC_DTOR_TEMP, SYM )       // - destruct temporary
//| OE_COUNT

                                // Debugging Codes:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -