Annotation of researchv9/libc/sun/fpcrtdefs.h, revision 1.1.1.1

1.1       root        1: /*      @(#)fpcrtdefs.h 1.1 86/02/03 SMI      */
                      2: 
                      3: /*
                      4:  * Copyright (c) 1985 by Sun Microsystems, Inc.
                      5:  */
                      6: 
                      7: #include "DEFS.h"
                      8: 
                      9: #define ENTER(f) .globl f ; f:
                     10: #define OBSOLETE(f) ENTER(f)           
                     11: /* Obsolete entry points, remove in next release. */
                     12: #define RTOBSOLETE(f) RTENTRY(f)       
                     13: 
                     14: /*
                     15: /* typedef enum fp_switch_type {
                     16: /*     fp_unspecified, /* Floating point unit not specified yet. */
                     17: /*       fp_software,    /* Floating point performed in software. */
                     18: /*       fp_skyffp,      /* Floating point performed on Sky FFP. */
                     19: /*       fp_mc68881,     /* Floating point performed on Motorola 68881. */
                     20: /*       fp_sunfpa       /* Floating point performed on Sun FPA. */
                     21: /*       } ;
                     22: */
                     23: #define FP_UNSPECIFIED 0       
                     24: #define FP_SOFTWARE    1       
                     25: #define FP_SKYFFP      2       
                     26: #define FP_MC68881     3       
                     27: #define FP_SUNFPA      4       
                     28: 
                     29: /*
                     30:        Structure of a V... entry point:
                     31: Vxxx:  jsr     V_switch:L
                     32:        .long   Fxxx    software        gets translated to jmp Fxxx:L
                     33:        .long   Sxxx    Sky ffp board   gets translated to jmp Sxxx:L
                     34:        .long   Mxxx    Motorola 68881 or emulator
                     35:        .long   Wxxx    Sun FPA board   gets translated to jmp Wxxx:L
                     36: */
                     37:  
                     38: #define VOFFSET 2
                     39: #define FOFFSET 6
                     40: #define SOFFSET 10
                     41: #define MOFFSET 14
                     42: #define WOFFSET 18
                     43: 
                     44: #define VECTORED(f) \
                     45:        .data   ; \
                     46: ENTER(V/**/f) ; \
                     47:        jsr     V_switch:L ; \
                     48:        .long   F/**/f,S/**/f,M/**/f,W/**/f
                     49: 
                     50: #define VECTOR(f,g) \
                     51:        .data   ; \
                     52: OBSOLETE(g) ; \
                     53: ENTER(V/**/f) ; \
                     54:        jsr     V_switch:L ; \
                     55:        .long   F/**/f,S/**/f,M/**/f,W/**/f
                     56: 
                     57: /*     Entries to convert between C parameter convention and Vxxx convention. */
                     58: 
                     59: #define CVDTOD(f,g) \
                     60:        ENTER(_/**/f) ; \
                     61:        moveml  sp@(4),d0/d1 ; \
                     62:        jra     V/**/g/**/d
                     63: 
                     64: #define CVDDTOD(f,g) \
                     65:        ENTER(_/**/f) ; \
                     66:        moveml  sp@(4),d0/d1 ; \
                     67:        lea     sp@(12),a0 ; \
                     68:        jra     V/**/g/**/d
                     69: 
                     70: #define VCDTOD(f) \
                     71:        ENTER(f) ; \
                     72:        moveml  d0/d1,sp@- ; \
                     73:         jsr            _C/**/f ; \
                     74:         addql   #8,sp ; \
                     75:         rts
                     76:  
                     77: #define VCDDTOD(f) \
                     78:        ENTER(f) ; \
                     79:        movel   a0@(4),sp@- ; \
                     80:        movel   a0@,sp@- ; \
                     81:        moveml  d0/d1,sp@- ; \
                     82:         jsr            _C/**/f ; \
                     83:         addl    #16,sp ; \
                     84:         rts
                     85:  
                     86: /*     Entries to convert between Fortran parameter convention and Vxxx convention. */
                     87: 
                     88: #define VFSTOS(x) \
                     89:        ENTER(x) ; \
                     90:        movel   d0,sp@- ; \
                     91:         pea    sp@ ; \
                     92:        jsr     _F/**/x/**/_ ; \
                     93:         addql    #8,sp ; \
                     94:         rts
                     95:  
                     96: #define VFSSTOS(x) \
                     97:        ENTER(x) ; \
                     98:        moveml  d0/d1,sp@- ; \
                     99:        pea     sp@(4) ; \
                    100:        pea     sp@(4) ; \
                    101:         jsr            _F/**/x/**/_ ; \
                    102:         addl    #16,sp ; \
                    103:         rts
                    104:  
                    105: #define VFDTOD(x) \
                    106:        ENTER(x) ; \
                    107:        moveml  d0/d1,sp@- ; \
                    108:         pea    sp@ ; \
                    109:        jsr     _F/**/x/**/_ ; \
                    110:         addl    #12,sp ; \
                    111:         rts
                    112:  
                    113: #define VFDDTOD(x) \
                    114:        ENTER(x) ; \
                    115:        moveml  d0/d1,sp@- ; \
                    116:        pea     a0@ ; \
                    117:        pea     sp@(4) ; \
                    118:         jsr            _F/**/x/**/_ ; \
                    119:         addl    #16,sp ; \
                    120:         rts
                    121:  
                    122: /*     Floating point condition codes, as in movew     #FLT,cc         */
                    123: 
                    124: #define FEQ    4       /* Z bit */
                    125: #define        FLT     25      /* XNC bits */
                    126: #define FGT    0       /* no bits */
                    127: #define        FUN     2       /* V bit */
                    128: 
                    129: /*     Floating point modes and status. */
                    130: 
                    131: /*
                    132:  *      Rounding Direction
                    133:  */
                    134: 
                    135: #define ROUNDMASK ~0x30
                    136: 
                    137: #define RNEAREST   0
                    138: #define RZERO   0x10
                    139: #define RMINUS  0x20
                    140: #define RPLUS   0x30
                    141: 
                    142: /*
                    143:  *      Rounding Precision
                    144:  */
                    145: 
                    146: #define ROUNDTODOUBLE 0x80     /* 68881 rounding precision corresponding to F/S/W */
                    147: 
                    148: /* 
                    149:  *     Jump Table Equates - all odd and negative
                    150:  */
                    151: 
                    152: #define RETURNX        -1      /* Return first argument */
                    153: #define RETURNY                -3      /* Return second argument */
                    154: #define        RETURNINVALID   -5      /* Return a quiet nan and set errno */
                    155: #define        RETURN1         -7      /* Return +1.0. */
                    156: #define        RETURNINFORZERO -9      /* Return +inf for +inf, +0 for -inf. */
                    157: 
                    158: /*
                    159:  *     Context save/restore info.
                    160:  */
                    161: 
                    162: #define FPSAVESIZE     64      /* Block for stacking state of current floating point device. */
                    163: 
                    164: /*     68020 cache clear call 
                    165:  *     68010 noop
                    166:  */
                    167: 
                    168: #define CLEARCACHE     trap    #2      /* was jsr _getpid */

unix.superglobalmegacorp.com

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