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

1.1       root        1: /* Configuration for an i386 running Mach as the target machine.  */
1.1.1.3 ! root        2: 
        !             3: /* We do want to add an underscore to the front of each user symbol.
        !             4:    i386gas.h checks this.  */
        !             5: #define YES_UNDERSCORES
        !             6: 
        !             7: #include "i386gstabs.h"
1.1       root        8: 
                      9: #undef CPP_PREDEFINES
                     10: #define CPP_PREDEFINES "-Dunix -Di386 -DMACH"
                     11: 
                     12: /* Specify extra dir to search for include files.  */
                     13: #define SYSTEM_INCLUDE_DIR "/usr/mach/include"
1.1.1.3 ! root       14: 
        !            15: /* Make stddef.h agree with types.h.  */
        !            16: #define SIZE_TYPE "long int"
1.1       root       17: 
                     18: /* Defines to be able to build libgcc.a with GCC.  */
                     19: 
1.1.1.2   root       20: /* It might seem that these are not important, since gcc 2 will never
                     21:    call libgcc for these functions.  But programs might be linked with
                     22:    code compiled by gcc 1, and then these will be used.  */
                     23: 
1.1       root       24: #define perform_udivsi3(a,b)                                           \
                     25: {                                                                      \
                     26:   register int dx asm("dx");                                           \
                     27:   register int ax asm("ax");                                           \
                     28:                                                                        \
                     29:   dx = 0;                                                              \
                     30:   ax = a;                                                              \
                     31:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
                     32:   return ax;                                                           \
                     33: }
                     34: 
1.1.1.2   root       35: #define perform_divsi3(a,b)                                            \
1.1       root       36: {                                                                      \
                     37:   register int dx asm("dx");                                           \
                     38:   register int ax asm("ax");                                           \
                     39:                                                                        \
                     40:   ax = a;                                                              \
                     41:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
                     42:   return ax;                                                           \
                     43: }
                     44: 
                     45: #define perform_umodsi3(a,b)                                           \
                     46: {                                                                      \
                     47:   register int dx asm("dx");                                           \
                     48:   register int ax asm("ax");                                           \
                     49:                                                                        \
                     50:   dx = 0;                                                              \
                     51:   ax = a;                                                              \
                     52:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
                     53:   return dx;                                                           \
                     54: }
                     55: 
1.1.1.2   root       56: #define perform_modsi3(a,b)                                            \
1.1       root       57: {                                                                      \
                     58:   register int dx asm("dx");                                           \
                     59:   register int ax asm("ax");                                           \
                     60:                                                                        \
                     61:   ax = a;                                                              \
                     62:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
                     63:   return dx;                                                           \
                     64: }
                     65: 
1.1.1.2   root       66: #define perform_fixdfsi(a)                                             \
1.1       root       67: {                                                                      \
                     68:   auto unsigned short ostatus;                                         \
                     69:   auto unsigned short nstatus;                                         \
                     70:   auto int ret;                                                                \
1.1.1.3 ! root       71:   auto double tmp;                                                     \
1.1       root       72:                                                                        \
                     73:   &ostatus;                    /* guarantee these land in memory */    \
                     74:   &nstatus;                                                            \
                     75:   &ret;                                                                        \
1.1.1.3 ! root       76:   &tmp;                                                                        \
1.1       root       77:                                                                        \
                     78:   asm volatile ("fnstcw %0" : "=m" (ostatus));                         \
                     79:   nstatus = ostatus | 0x0c00;                                          \
                     80:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus));                \
1.1.1.3 ! root       81:   tmp = a;                                                             \
        !            82:   asm volatile ("fldl %0" : /* no outputs */ : "m" (tmp));             \
1.1       root       83:   asm volatile ("fistpl %0" : "=m" (ret));                             \
1.1.1.2   root       84:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus));                \
1.1       root       85:                                                                        \
                     86:   return ret;                                                          \
                     87: }

unix.superglobalmegacorp.com

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