ifenv.h

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C头文件 代码 · 共 830 行 · 第 1/2 页

H
830
字号
/****************************************************************************
*
*                            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!
*
****************************************************************************/


// When compiling "/3s" or "/windows", by default, functions modify CPU
// registers and 80x87 registers. It is not possible to tell the code generator
// that a function does not modify 80x87 registers but the functions
// it calls modifies 80x87 registers. So the best we can do is specify
// that functions do not modify CPU registers.

#if defined( __386__ ) || defined( M_I86 )
  #if defined( __386__ )
    #pragma aux if_rtn "IF@*" parm routine [EAX EBX ECX EDX 8087];
    #pragma aux if_va  "IF@*" parm caller [];
    #pragma aux xf_rtn "IF@*";
    #if defined( __SW_3S )
      #if defined( __FLAT__ )
        #pragma aux (if_rtn) if_rtn modify [8087 gs];
        #pragma aux (if_va)  if_va  modify [8087 gs];
        #pragma aux (xf_rtn) xf_rtn modify [8087 gs];
      #else
        #pragma aux (if_rtn) if_rtn modify [8087 es fs gs];
        #pragma aux (if_va)  if_va  modify [8087 es fs gs];
        #pragma aux (xf_rtn) xf_rtn modify [8087 es fs gs];
      #endif
      #if defined( __FPI__ )
        // When compiling "/3s", by default, functions that return floating-point
        // values do NOT return them using the 80x87 so we must explicitly say
        // they do.
        #pragma aux (if_rtn) flt_if_rtn value [8087];
        #pragma aux (if_va) flt_if_va value [8087];
      #else
        #pragma aux (if_rtn) flt_if_rtn;
        #pragma aux (if_va) flt_if_va;
      #endif
    #else
      #pragma aux (if_rtn) flt_if_rtn;
      #pragma aux (if_va) flt_if_va;
    #endif
  #else
    #pragma aux if_rtn "IF@*" parm [AX BX CX DX 8087];
    #pragma aux if_va "IF@*" parm caller [];
    #pragma aux xf_rtn "IF@*";
    #pragma aux (if_rtn) flt_if_rtn;
    #pragma aux (if_va) flt_if_va;
  #endif

  // Define the following if the C library contains alternate definitions
  // of certain intrinsic functions.

  #define __alternate_if__
  #define ALOG  LOG
  #define ALOG10        LOG10
  #define AMOD  FMOD
  #define DMOD  DFMOD
  #define QMOD  QFMOD
  #pragma aux (flt_if_rtn) LOG; // support routine called IF@LOG, not IF@ALOG
  #pragma aux (flt_if_rtn) LOG10;       // support routine called IF@LOG, not IF@ALOG
  #pragma aux (flt_if_rtn) FMOD;        // support routine called IF@FMOD, not IF@AMOD
  #pragma aux (flt_if_rtn) DFMOD;       // support routine called IF@DFMOD, not IF@DMOD
  #pragma aux (flt_if_rtn) QFMOD;       // support routine called IF@QFMOD, not IF@QMOD

  // UNCOMMENT_TOKEN
  // this can be removed once long double is properly supported
  // by the C library
  #define       __extended_not_implemented__

  #pragma aux (if_rtn) IOR;
  #pragma aux (if_rtn) IAND;
  #pragma aux (if_rtn) NOT;
  #pragma aux (if_rtn) IEOR;
  #pragma aux (if_rtn) ISHL;
  #pragma aux (if_rtn) ISHA;
  #pragma aux (if_rtn) ISHC;
  #pragma aux (if_rtn) BTEST;
  #pragma aux (if_rtn) IBSET;
  #pragma aux (if_rtn) IBCLR;
  #pragma aux (if_rtn) IBCHNG;
  #pragma aux (if_rtn) ISHFT;
  #pragma aux (if_rtn) I1ABS;
  #pragma aux (if_rtn) I1AND;
  #pragma aux (if_rtn) I1BCHNG;
  #pragma aux (if_rtn) I1BCLR;
  #pragma aux (if_rtn) I1BSET;
  #pragma aux (if_rtn) I1BTEST;
  #pragma aux (if_rtn) I1DIM;
  #pragma aux (if_rtn) I1EOR;
  #pragma aux (if_rtn) I1MIN0;
  #pragma aux (if_rtn) I1MAX0;
  #pragma aux (if_rtn) I1MOD;
  #pragma aux (if_rtn) I1NOT;
  #pragma aux (if_rtn) I1OR;
  #pragma aux (if_rtn) I1SHA;
  #pragma aux (if_rtn) I1SHC;
  #pragma aux (if_rtn) I1SHFT;
  #pragma aux (if_rtn) I1SHL;
  #pragma aux (if_rtn) I1SIGN;
  #pragma aux (if_rtn) I2ABS;
  #pragma aux (if_rtn) I2AND;
  #pragma aux (if_rtn) I2BCHNG;
  #pragma aux (if_rtn) I2BCLR;
  #pragma aux (if_rtn) I2BSET;
  #pragma aux (if_rtn) I2BTEST;
  #pragma aux (if_rtn) I2DIM;
  #pragma aux (if_rtn) I2EOR;
  #pragma aux (if_rtn) I2MIN0;
  #pragma aux (if_rtn) I2MAX0;
  #pragma aux (if_rtn) I2MOD;
  #pragma aux (if_rtn) I2NOT;
  #pragma aux (if_rtn) I2OR;
  #pragma aux (if_rtn) I2SHA;
  #pragma aux (if_rtn) I2SHC;
  #pragma aux (if_rtn) I2SHFT;
  #pragma aux (if_rtn) I2SHL;
  #pragma aux (if_rtn) I2SIGN;
  #pragma aux (if_rtn) I1LSHIFT;
  #pragma aux (if_rtn) I1RSHIFT;
  #pragma aux (if_rtn) I2LSHIFT;
  #pragma aux (if_rtn) I2RSHIFT;
  #pragma aux (if_rtn) LSHIFT;
  #pragma aux (if_rtn) RSHIFT;
  #pragma aux (flt_if_rtn) SQRT;
  #pragma aux (flt_if_rtn) DSQRT;
  #pragma aux (flt_if_rtn) QSQRT;
  #pragma aux (if_rtn) CSQRT;
  #pragma aux (if_rtn) CDSQRT;
  #pragma aux (if_rtn) CQSQRT;
  #pragma aux (flt_if_rtn) EXP;
  #pragma aux (flt_if_rtn) DEXP;
  #pragma aux (flt_if_rtn) QEXP;
  #pragma aux (if_rtn) CEXP;
  #pragma aux (if_rtn) CDEXP;
  #pragma aux (if_rtn) CQEXP;
  #pragma aux (flt_if_rtn) ALOG;
  #pragma aux (flt_if_rtn) DLOG;
  #pragma aux (flt_if_rtn) QLOG;
  #pragma aux (if_rtn) CLOG;
  #pragma aux (if_rtn) CDLOG;
  #pragma aux (if_rtn) CQLOG;
  #pragma aux (flt_if_rtn) ALOG10;
  #pragma aux (flt_if_rtn) DLOG10;
  #pragma aux (flt_if_rtn) QLOG10;
  #pragma aux (flt_if_rtn) DASIN;
  #pragma aux (flt_if_rtn) QASIN;
  #pragma aux (flt_if_rtn) DSIN;
  #pragma aux (flt_if_rtn) QSIN;
  #pragma aux (if_rtn) CSIN;
  #pragma aux (if_rtn) CDSIN;
  #pragma aux (if_rtn) CQSIN;
  #pragma aux (flt_if_rtn) COS;
  #pragma aux (flt_if_rtn) DCOS;
  #pragma aux (flt_if_rtn) QCOS;
  #pragma aux (if_rtn) CCOS;
  #pragma aux (if_rtn) CDCOS;
  #pragma aux (if_rtn) CQCOS;
  #pragma aux (flt_if_rtn) ASIN;
  #pragma aux (flt_if_rtn) SIN;
  #pragma aux (flt_if_rtn) ACOS;
  #pragma aux (flt_if_rtn) DACOS;
  #pragma aux (flt_if_rtn) QACOS;
  #pragma aux (flt_if_rtn) ATAN;
  #pragma aux (flt_if_rtn) DATAN;
  #pragma aux (flt_if_rtn) QATAN;
  #pragma aux (flt_if_rtn) ATAN2;
  #pragma aux (flt_if_rtn) DATAN2;
  #pragma aux (flt_if_rtn) QATAN2;
  #pragma aux (flt_if_rtn) SINH;
  #pragma aux (flt_if_rtn) DSINH;
  #pragma aux (flt_if_rtn) QSINH;
  #pragma aux (flt_if_rtn) TAN;
  #pragma aux (flt_if_rtn) DTAN;
  #pragma aux (flt_if_rtn) QTAN;
  #pragma aux (flt_if_rtn) COSH;
  #pragma aux (flt_if_rtn) DCOSH;
  #pragma aux (flt_if_rtn) QCOSH;
  #pragma aux (flt_if_rtn) TANH;
  #pragma aux (flt_if_rtn) DTANH;
  #pragma aux (flt_if_rtn) QTANH;
  #pragma aux (flt_if_rtn) ABS;
  #pragma aux (flt_if_rtn) DABS;
  #pragma aux (flt_if_rtn) QABS;
  #pragma aux (flt_if_rtn) CABS;
  #pragma aux (flt_if_rtn) CDABS;
  #pragma aux (flt_if_rtn) CQABS;
  #pragma aux (if_rtn) IABS;
  #pragma aux (flt_if_rtn) DPROD;
  #pragma aux (flt_if_rtn) QPROD;
  #pragma aux (if_rtn) IDIM;
  #pragma aux (flt_if_rtn) DIM;
  #pragma aux (flt_if_rtn) DDIM;
  #pragma aux (flt_if_rtn) QDIM;
  #pragma aux (if_rtn) ISIGN;
  #pragma aux (flt_if_rtn) SIGN;
  #pragma aux (flt_if_rtn) DSIGN;
  #pragma aux (flt_if_rtn) QSIGN;
  #pragma aux (flt_if_rtn) AIMAG;
  #pragma aux (flt_if_rtn) DIMAG;
  #pragma aux (flt_if_rtn) QIMAG;
  #pragma aux (if_rtn) CONJG;
  #pragma aux (if_rtn) DCONJG;
  #pragma aux (if_rtn) QCONJG;
  #pragma aux (if_rtn) LEN;
  #pragma aux (if_rtn) INDEX;
  #pragma aux (if_rtn) MOD;
  #pragma aux (flt_if_rtn) AMOD;
  #pragma aux (if_rtn) MAX0;
  #pragma aux (flt_if_rtn) DMOD;
  #pragma aux (flt_if_rtn) QMOD;
  #pragma aux (flt_if_rtn) AMAX0;
  #pragma aux (flt_if_rtn) AMAX1;
  #pragma aux (flt_if_rtn) DMAX1;
  #pragma aux (flt_if_rtn) QMAX1;
  #pragma aux (if_rtn) MAX1;
  #pragma aux (if_rtn) MIN0;
  #pragma aux (flt_if_rtn) AMIN1;
  #pragma aux (flt_if_rtn) DMIN1;
  #pragma aux (flt_if_rtn) QMIN1;
  #pragma aux (flt_if_rtn) AMIN0;
  #pragma aux (if_rtn) MIN1;
  #pragma aux (if_rtn) LGE;
  #pragma aux (if_rtn) LGT;
  #pragma aux (if_rtn) LLE;
  #pragma aux (if_rtn) LLT;
  #pragma aux (if_rtn) CHAR;
  #pragma aux (if_rtn) ICHAR;
  #pragma aux (flt_if_rtn) AINT;
  #pragma aux (flt_if_rtn) DINT;
  #pragma aux (flt_if_rtn) QINT;
  #pragma aux (flt_if_rtn) ANINT;
  #pragma aux (flt_if_rtn) DNINT;
  #pragma aux (flt_if_rtn) QNINT;
  #pragma aux (if_rtn) NINT;
  #pragma aux (if_rtn) IDNINT;
  #pragma aux (if_rtn) IQNINT;
  #pragma aux (flt_if_rtn) GAMMA;
  #pragma aux (flt_if_rtn) DGAMMA;
  #pragma aux (flt_if_rtn) QGAMMA;
  #pragma aux (flt_if_rtn) ALGAMA;
  #pragma aux (flt_if_rtn) DLGAMA;
  #pragma aux (flt_if_rtn) QLGAMA;
  #pragma aux (flt_if_rtn) ERF;
  #pragma aux (flt_if_rtn) DERF;
  #pragma aux (flt_if_rtn) QERF;
  #pragma aux (flt_if_rtn) ERFC;
  #pragma aux (flt_if_rtn) DERFC;
  #pragma aux (flt_if_rtn) QERFC;
  #pragma aux (flt_if_rtn) COTAN;
  #pragma aux (flt_if_rtn) DCOTAN;
  #pragma aux (flt_if_rtn) QCOTAN;
  #pragma aux (if_rtn) LENTRIM;
  #pragma aux (xf_rtn) XIOR;
  #pragma aux (xf_rtn) XIAND;
  #pragma aux (xf_rtn) XNOT;
  #pragma aux (xf_rtn) XIEOR;
  #pragma aux (xf_rtn) XISHL;
  #pragma aux (xf_rtn) XISHA;
  #pragma aux (xf_rtn) XISHC;
  #pragma aux (xf_rtn) XBTEST;
  #pragma aux (xf_rtn) XIBSET;
  #pragma aux (xf_rtn) XIBCLR;
  #pragma aux (xf_rtn) XIBCHNG;
  #pragma aux (xf_rtn) XISHFT;
  #pragma aux (xf_rtn) XSQRT;
  #pragma aux (xf_rtn) XDSQRT;
  #pragma aux (xf_rtn) XQSQRT;
  #pragma aux (xf_rtn) XCSQRT;
  #pragma aux (xf_rtn) XCDSQRT;
  #pragma aux (xf_rtn) XCQSQRT;
  #pragma aux (xf_rtn) XEXP;
  #pragma aux (xf_rtn) XDEXP;
  #pragma aux (xf_rtn) XQEXP;
  #pragma aux (xf_rtn) XCEXP;
  #pragma aux (xf_rtn) XCDEXP;
  #pragma aux (xf_rtn) XCQEXP;
  #pragma aux (xf_rtn) XALOG;
  #pragma aux (xf_rtn) XDLOG;
  #pragma aux (xf_rtn) XQLOG;
  #pragma aux (xf_rtn) XCLOG;
  #pragma aux (xf_rtn) XCDLOG;
  #pragma aux (xf_rtn) XCQLOG;
  #pragma aux (xf_rtn) XALOG10;
  #pragma aux (xf_rtn) XDLOG10;
  #pragma aux (xf_rtn) XQLOG10;
  #pragma aux (xf_rtn) XDASIN;
  #pragma aux (xf_rtn) XQASIN;
  #pragma aux (xf_rtn) XDSIN;
  #pragma aux (xf_rtn) XQSIN;
  #pragma aux (xf_rtn) XCSIN;
  #pragma aux (xf_rtn) XCDSIN;
  #pragma aux (xf_rtn) XCQSIN;
  #pragma aux (xf_rtn) XCOS;
  #pragma aux (xf_rtn) XDCOS;
  #pragma aux (xf_rtn) XQCOS;
  #pragma aux (xf_rtn) XCCOS;
  #pragma aux (xf_rtn) XCDCOS;
  #pragma aux (xf_rtn) XCQCOS;
  #pragma aux (xf_rtn) XASIN;
  #pragma aux (xf_rtn) XSIN;
  #pragma aux (xf_rtn) XACOS;
  #pragma aux (xf_rtn) XDACOS;
  #pragma aux (xf_rtn) XQACOS;
  #pragma aux (xf_rtn) XATAN;
  #pragma aux (xf_rtn) XDATAN;
  #pragma aux (xf_rtn) XQATAN;
  #pragma aux (xf_rtn) XATAN2;
  #pragma aux (xf_rtn) XDATAN2;
  #pragma aux (xf_rtn) XQATAN2;
  #pragma aux (xf_rtn) XSINH;
  #pragma aux (xf_rtn) XDSINH;
  #pragma aux (xf_rtn) XQSINH;
  #pragma aux (xf_rtn) XTAN;
  #pragma aux (xf_rtn) XDTAN;
  #pragma aux (xf_rtn) XQTAN;
  #pragma aux (xf_rtn) XCOSH;
  #pragma aux (xf_rtn) XDCOSH;
  #pragma aux (xf_rtn) XQCOSH;
  #pragma aux (xf_rtn) XTANH;
  #pragma aux (xf_rtn) XDTANH;
  #pragma aux (xf_rtn) XQTANH;
  #pragma aux (xf_rtn) XABS;
  #pragma aux (xf_rtn) XDABS;
  #pragma aux (xf_rtn) XQABS;
  #pragma aux (xf_rtn) XCABS;
  #pragma aux (xf_rtn) XCDABS;
  #pragma aux (xf_rtn) XCQABS;
  #pragma aux (xf_rtn) XIABS;
  #pragma aux (xf_rtn) XDPROD;
  #pragma aux (xf_rtn) XQPROD;
  #pragma aux (xf_rtn) XIDIM;
  #pragma aux (xf_rtn) XDIM;
  #pragma aux (xf_rtn) XDDIM;
  #pragma aux (xf_rtn) XQDIM;
  #pragma aux (xf_rtn) XISIGN;
  #pragma aux (xf_rtn) XSIGN;
  #pragma aux (xf_rtn) XDSIGN;
  #pragma aux (xf_rtn) XQSIGN;
  #pragma aux (xf_rtn) XAIMAG;
  #pragma aux (xf_rtn) XDIMAG;
  #pragma aux (xf_rtn) XQIMAG;
  #pragma aux (xf_rtn) XCONJG;
  #pragma aux (xf_rtn) XDCONJG;
  #pragma aux (xf_rtn) XQCONJG;
  #pragma aux (xf_rtn) XLEN;
  #pragma aux (xf_rtn) XINDEX;
  #pragma aux (xf_rtn) XMOD;
  #pragma aux (xf_rtn) XAMOD;
  #pragma aux (xf_rtn) XDMOD;
  #pragma aux (xf_rtn) XQMOD;
  #pragma aux (if_va) XMAX0;
  #pragma aux (flt_if_va) XAMAX0;
  #pragma aux (flt_if_va) XAMAX1;
  #pragma aux (flt_if_va) XDMAX1;
  #pragma aux (flt_if_va) XQMAX1;
  #pragma aux (if_va) XMAX1;
  #pragma aux (if_va) XMIN0;
  #pragma aux (flt_if_va) XAMIN1;
  #pragma aux (flt_if_va) XDMIN1;
  #pragma aux (flt_if_va) XQMIN1;
  #pragma aux (flt_if_va) XAMIN0;
  #pragma aux (if_va) XMIN1;
  #pragma aux (xf_rtn) XLGE;
  #pragma aux (xf_rtn) XLGT;
  #pragma aux (xf_rtn) XLLE;
  #pragma aux (xf_rtn) XLLT;
  #pragma aux (xf_rtn) XCHAR;
  #pragma aux (xf_rtn) XICHAR;
  #pragma aux (xf_rtn) XAINT;
  #pragma aux (xf_rtn) XDINT;
  #pragma aux (xf_rtn) XQINT;
  #pragma aux (xf_rtn) XANINT;
  #pragma aux (xf_rtn) XDNINT;
  #pragma aux (xf_rtn) XQNINT;
  #pragma aux (xf_rtn) XNINT;
  #pragma aux (xf_rtn) XIDNINT;
  #pragma aux (xf_rtn) XIQNINT;
  #pragma aux (xf_rtn) XGAMMA;
  #pragma aux (xf_rtn) XDGAMMA;
  #pragma aux (xf_rtn) XQGAMMA;
  #pragma aux (xf_rtn) XALGAMA;
  #pragma aux (xf_rtn) XDLGAMA;
  #pragma aux (xf_rtn) XQLGAMA;
  #pragma aux (xf_rtn) XERF;
  #pragma aux (xf_rtn) XDERF;
  #pragma aux (xf_rtn) XQERF;
  #pragma aux (xf_rtn) XERFC;
  #pragma aux (xf_rtn) XDERFC;
  #pragma aux (xf_rtn) XQERFC;

⌨️ 快捷键说明

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