Annotation of GNUtools/cctools/include/architecture/i386/fpu.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1992 NeXT Computer, Inc.
        !             3:  *
        !             4:  * Intel386 Family:    Floating Point unit.
        !             5:  *
        !             6:  * HISTORY
        !             7:  *
        !             8:  * 5 October 1992 David E. Bohman at NeXT
        !             9:  *     Added names to previously unamed fields in the mantissa.
        !            10:  *
        !            11:  * 5 April 1992 David E. Bohman at NeXT
        !            12:  *     Created.
        !            13:  */
        !            14: 
        !            15: /*
        !            16:  * Data register.
        !            17:  */
        !            18: 
        !            19: typedef struct fp_data_reg {
        !            20:     unsigned short             mant;
        !            21:     unsigned short             mant1   :16,
        !            22:                                mant2   :16,
        !            23:                                mant3   :16;
        !            24:     unsigned short             exp     :15,
        !            25:                                sign    :1;
        !            26: } fp_data_reg_t;
        !            27: 
        !            28: /*
        !            29:  * Data register stack.
        !            30:  */
        !            31: 
        !            32: typedef struct fp_stack {
        !            33:     fp_data_reg_t              ST[8];
        !            34: } fp_stack_t;
        !            35: 
        !            36: /*
        !            37:  * Register stack tag word.
        !            38:  */
        !            39: 
        !            40: typedef struct fp_tag {
        !            41:     unsigned short             tag0    :2,
        !            42:                                tag1    :2,
        !            43:                                tag2    :2,
        !            44:                                tag3    :2,
        !            45:                                tag4    :2,
        !            46:                                tag5    :2,
        !            47:                                tag6    :2,
        !            48:                                tag7    :2;
        !            49: #define FP_TAG_VALID           0
        !            50: #define FP_TAG_ZERO            1
        !            51: #define FP_TAG_SPEC            2
        !            52: #define FP_TAG_EMPTY           3
        !            53: } fp_tag_t;
        !            54: 
        !            55: /*
        !            56:  * Status word.
        !            57:  */
        !            58: 
        !            59: typedef struct fp_status {
        !            60:     unsigned short             invalid :1,
        !            61:                                denorm  :1,
        !            62:                                zdiv    :1,
        !            63:                                ovrfl   :1,
        !            64:                                undfl   :1,
        !            65:                                precis  :1,
        !            66:                                stkflt  :1,
        !            67:                                errsumm :1,
        !            68:                                c0      :1,
        !            69:                                c1      :1,
        !            70:                                c2      :1,
        !            71:                                tos     :3,
        !            72:                                c3      :1,
        !            73:                                busy    :1;
        !            74: } fp_status_t;
        !            75: 
        !            76: /*
        !            77:  * Control word.
        !            78:  */
        !            79: 
        !            80: typedef struct fp_control {
        !            81:     unsigned short             invalid :1,
        !            82:                                denorm  :1,
        !            83:                                zdiv    :1,
        !            84:                                ovrfl   :1,
        !            85:                                undfl   :1,
        !            86:                                precis  :1,
        !            87:                                        :2,
        !            88:                                pc      :2,
        !            89: #define FP_PREC_24B            0
        !            90: #define        FP_PREC_53B             2
        !            91: #define FP_PREC_64B            3
        !            92:                                rc      :2,
        !            93: #define FP_RND_NEAR            0
        !            94: #define FP_RND_DOWN            1
        !            95: #define FP_RND_UP              2
        !            96: #define FP_CHOP                        3
        !            97:                                /*inf*/ :1,
        !            98:                                        :3;
        !            99: } fp_control_t;
        !           100: 
        !           101: #import <architecture/i386/sel.h>
        !           102: 
        !           103: /*
        !           104:  * Floating point 'environment'
        !           105:  * used by FSTENV/FLDENV instructions.
        !           106:  */
        !           107: 
        !           108: typedef struct fp_env {
        !           109:     fp_control_t               control;
        !           110:     unsigned short                     :16;
        !           111:     fp_status_t                        status;
        !           112:     unsigned short                     :16;
        !           113:     fp_tag_t                   tag;
        !           114:     unsigned short                     :16;
        !           115:     unsigned int               ip;
        !           116:     sel_t                      cs;
        !           117:     unsigned short             opcode;
        !           118:     unsigned int               dp;
        !           119:     sel_t                      ds;
        !           120:     unsigned short                     :16;
        !           121: } fp_env_t;
        !           122: 
        !           123: /*
        !           124:  * Floating point state
        !           125:  * used by FSAVE/FRSTOR instructions.
        !           126:  */
        !           127:  
        !           128: typedef struct fp_state {
        !           129:     fp_env_t                   environ;
        !           130:     fp_stack_t                 stack;
        !           131: } fp_state_t;

unix.superglobalmegacorp.com

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