Annotation of gcc/config/i386bsd.h, revision 1.1.1.2

1.1       root        1: /* Configuration for an i386 running 386BSD as the target machine.  */
1.1.1.2 ! root        2: 
        !             3: /* This is tested by i386gas.h.  */
        !             4: #define YES_UNDERSCORES
        !             5: 
        !             6: #include "i386gstabs.h"
1.1       root        7: 
                      8: #undef CPP_PREDEFINES
1.1.1.2 ! root        9: #define CPP_PREDEFINES "-Dunix -Di386 -D____386BSD____ -D__386BSD__ -DBSD_NET2"
        !            10: 
        !            11: /* Like the default, except no -lg.  */
        !            12: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
        !            13: 
        !            14: #undef SIZE_TYPE
        !            15: #define SIZE_TYPE "unsigned int"
        !            16: 
        !            17: #undef PTRDIFF_TYPE
        !            18: #define PTRDIFF_TYPE "int"
        !            19: 
        !            20: #undef WCHAR_TYPE
        !            21: #define WCHAR_TYPE "short unsigned int"
        !            22: 
        !            23: #define WCHAR_UNSIGNED 1
        !            24: 
        !            25: #undef WCHAR_TYPE_SIZE
        !            26: #define WCHAR_TYPE_SIZE 16
        !            27: 
        !            28: /* 386BSD does have atexit.  */
        !            29: 
        !            30: #define HAVE_ATEXIT
        !            31: 
        !            32: /* Redefine this to use %eax instead of %edx.  */
        !            33: #undef FUNCTION_PROFILER
        !            34: #define FUNCTION_PROFILER(FILE, LABELNO)  \
        !            35: {                                                                      \
        !            36:   if (flag_pic)                                                                \
        !            37:     {                                                                  \
        !            38:       fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%eax\n",             \
        !            39:               LPREFIX, (LABELNO));                                     \
        !            40:       fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n");                   \
        !            41:     }                                                                  \
        !            42:   else                                                                 \
        !            43:     {                                                                  \
        !            44:       fprintf (FILE, "\tmovl $%sP%d,%%eax\n", LPREFIX, (LABELNO));     \
        !            45:       fprintf (FILE, "\tcall mcount\n");                               \
        !            46:     }                                                                  \
        !            47: }
        !            48: 
        !            49: /* There are conflicting reports about whether this system uses
        !            50:    a different assembler syntax.  [email protected] says # is right.  */
        !            51: #undef COMMENT_BEGIN
        !            52: #define COMMENT_BEGIN "#"
        !            53: 
        !            54: #undef ASM_APP_ON
        !            55: #define ASM_APP_ON "#APP\n"
        !            56: 
        !            57: #undef ASM_APP_OFF
        !            58: #define ASM_APP_OFF "#NO_APP\n"
        !            59: 
        !            60: /* Defines to be able to build libgcc.a with GCC.
        !            61:    These are the same as in i386mach.h.  */
        !            62: 
        !            63: /* It might seem that these are not important, since gcc 2 will never
        !            64:    call libgcc for these functions.  But programs might be linked with
        !            65:    code compiled by gcc 1, and then these will be used.  */
        !            66: 
        !            67: #define perform_udivsi3(a,b)                                           \
        !            68: {                                                                      \
        !            69:   register int dx asm("dx");                                           \
        !            70:   register int ax asm("ax");                                           \
        !            71:                                                                        \
        !            72:   dx = 0;                                                              \
        !            73:   ax = a;                                                              \
        !            74:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
        !            75:   return ax;                                                           \
        !            76: }
        !            77: 
        !            78: #define perform_divsi3(a,b)                                            \
        !            79: {                                                                      \
        !            80:   register int dx asm("dx");                                           \
        !            81:   register int ax asm("ax");                                           \
        !            82:                                                                        \
        !            83:   ax = a;                                                              \
        !            84:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
        !            85:   return ax;                                                           \
        !            86: }
        !            87: 
        !            88: #define perform_umodsi3(a,b)                                           \
        !            89: {                                                                      \
        !            90:   register int dx asm("dx");                                           \
        !            91:   register int ax asm("ax");                                           \
        !            92:                                                                        \
        !            93:   dx = 0;                                                              \
        !            94:   ax = a;                                                              \
        !            95:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
        !            96:   return dx;                                                           \
        !            97: }
        !            98: 
        !            99: #define perform_modsi3(a,b)                                            \
        !           100: {                                                                      \
        !           101:   register int dx asm("dx");                                           \
        !           102:   register int ax asm("ax");                                           \
        !           103:                                                                        \
        !           104:   ax = a;                                                              \
        !           105:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
        !           106:   return dx;                                                           \
        !           107: }
        !           108: 
        !           109: 
        !           110: #define perform_fixdfsi(a)                                             \
        !           111: {                                                                      \
        !           112:   auto unsigned short ostatus;                                         \
        !           113:   auto unsigned short nstatus;                                         \
        !           114:   auto int ret;                                                                \
        !           115:   auto double tmp;                                                     \
        !           116:                                                                        \
        !           117:   &ostatus;                    /* guarantee these land in memory */    \
        !           118:   &nstatus;                                                            \
        !           119:   &ret;                                                                        \
        !           120:   &tmp;                                                                        \
        !           121:                                                                        \
        !           122:   asm volatile ("fnstcw %0" : "=m" (ostatus));                         \
        !           123:   nstatus = ostatus | 0x0c00;                                          \
        !           124:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus));                \
        !           125:   tmp = a;                                                             \
        !           126:   asm volatile ("fldl %0" : /* no outputs */ : "m" (tmp));             \
        !           127:   asm volatile ("fistpl %0" : "=m" (ret));                             \
        !           128:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus));                \
        !           129:                                                                        \
        !           130:   return ret;                                                          \
        !           131: }
        !           132: 
        !           133: /* The following macros are stolen from i386v4.h */
        !           134: /* These have to be defined to get PIC code correct */
        !           135: 
        !           136: /* This is how to output an element of a case-vector that is relative.
        !           137:    This is only used for PIC code.  See comments by the `casesi' insn in
        !           138:    i386.md for an explanation of the expression this outputs. */
        !           139: 
        !           140: #undef ASM_OUTPUT_ADDR_DIFF_ELT
        !           141: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
        !           142:   fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
        !           143: 
        !           144: /* Indicate that jump tables go in the text section.  This is
        !           145:    necessary when compiling PIC code.  */
1.1       root      146: 
1.1.1.2 ! root      147: #define JUMP_TABLES_IN_TEXT_SECTION

unix.superglobalmegacorp.com

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