Annotation of gcc/config/i386mach.h, revision 1.1

1.1     ! root        1: /* Configuration for an i386 running Mach as the target machine.  */
        !             2: #include "i386gas.h"
        !             3: 
        !             4: #undef CPP_PREDEFINES
        !             5: #define CPP_PREDEFINES "-Dunix -Di386 -DMACH"
        !             6: 
        !             7: /* Specify extra dir to search for include files.  */
        !             8: #define SYSTEM_INCLUDE_DIR "/usr/mach/include"
        !             9: 
        !            10: /* Defines to be able to build libgcc.a with GCC.  */
        !            11: 
        !            12: #define perform_udivsi3(a,b)                                           \
        !            13: {                                                                      \
        !            14:   register int dx asm("dx");                                           \
        !            15:   register int ax asm("ax");                                           \
        !            16:                                                                        \
        !            17:   dx = 0;                                                              \
        !            18:   ax = a;                                                              \
        !            19:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
        !            20:   return ax;                                                           \
        !            21: }
        !            22: 
        !            23: #define perform_divsi3(a,b)                                                    \
        !            24: {                                                                      \
        !            25:   register int dx asm("dx");                                           \
        !            26:   register int ax asm("ax");                                           \
        !            27:                                                                        \
        !            28:   ax = a;                                                              \
        !            29:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
        !            30:   return ax;                                                           \
        !            31: }
        !            32: 
        !            33: #define perform_umodsi3(a,b)                                           \
        !            34: {                                                                      \
        !            35:   register int dx asm("dx");                                           \
        !            36:   register int ax asm("ax");                                           \
        !            37:                                                                        \
        !            38:   dx = 0;                                                              \
        !            39:   ax = a;                                                              \
        !            40:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
        !            41:   return dx;                                                           \
        !            42: }
        !            43: 
        !            44: #define perform_modsi3(a,b)                                                    \
        !            45: {                                                                      \
        !            46:   register int dx asm("dx");                                           \
        !            47:   register int ax asm("ax");                                           \
        !            48:                                                                        \
        !            49:   ax = a;                                                              \
        !            50:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
        !            51:   return dx;                                                           \
        !            52: }
        !            53: 
        !            54: #define perform_fix_truncdfsi2(a)                                              \
        !            55: {                                                                      \
        !            56:   auto unsigned short ostatus;                                         \
        !            57:   auto unsigned short nstatus;                                         \
        !            58:   auto int ret;                                                                \
        !            59:                                                                        \
        !            60:   &ostatus;                    /* guarantee these land in memory */    \
        !            61:   &nstatus;                                                            \
        !            62:   &ret;                                                                        \
        !            63:                                                                        \
        !            64:   asm volatile ("fnstcw %0" : "=m" (ostatus));                         \
        !            65:   nstatus = ostatus | 0x0c00;                                          \
        !            66:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus));                \
        !            67:   asm volatile ("fldl %0" : /* no outputs */ : "m" (a));               \
        !            68:   asm volatile ("fistpl %0" : "=m" (ret));                             \
        !            69:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus));                \
        !            70:                                                                        \
        !            71:   return ret;                                                          \
        !            72: }

unix.superglobalmegacorp.com

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