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

1.1       root        1: /* Definitions of target machine for GNU compiler.
                      2:    Encore Multimax (OSF/1 with OSF/rose) version.
                      3:    Copyright (C) 1991 Free Software Foundation, Inc.
                      4: 
                      5: This file is part of GNU CC.
                      6: 
                      7: GNU CC is free software; you can redistribute it and/or modify
                      8: it under the terms of the GNU General Public License as published by
                      9: the Free Software Foundation; either version 2, or (at your option)
                     10: any later version.
                     11: 
                     12: GNU CC is distributed in the hope that it will be useful,
                     13: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: GNU General Public License for more details.
                     16: 
                     17: You should have received a copy of the GNU General Public License
                     18: along with GNU CC; see the file COPYING.  If not, write to
                     19: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                     20: 
                     21: #include "i386gas.h"
                     22: 
                     23: #define OSF_OS
                     24: 
                     25: /* Use a more friendly abort which prints internal compiler error,
                     26:    rather than just dumping core.  */
                     27: 
                     28: #ifndef abort
                     29: #define abort fancy_abort
                     30: #endif
                     31: 
                     32: /* Prefix that appears before all global/static identifiers, except for
                     33:    temporary labels.  */
                     34: 
                     35: #define IDENTIFIER_PREFIX "_"
                     36: 
                     37: /* Suffix that appears after all global/static identifiers, except for
                     38:    temporary labels.  */
                     39: 
                     40: #define IDENTIFIER_SUFFIX ""
                     41: 
                     42: /* Change default predefines.  */
                     43: #ifdef CPP_PREDEFINES
                     44: #undef CPP_PREDEFINES
                     45: #endif
                     46: #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Di386"
                     47: 
                     48: #ifdef  CPP_SPEC
                     49: #undef  CPP_SPEC
                     50: #endif
                     51: #define CPP_SPEC "\
                     52: %{.S:  -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
                     53: %{.cc: -D__LANGUAGE_C_PLUS_PLUS} \
                     54: %{.cxx:        -D__LANGUAGE_C_PLUS_PLUS} \
                     55: %{.C:  -D__LANGUAGE_C_PLUS_PLUS} \
                     56: %{.m:  -D__LANGUAGE_OBJECTIVE_C} \
                     57: %{!.S: -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}"
                     58: 
                     59: #ifdef  CC1_SPEC
                     60: #undef  CC1_SPEC
                     61: #endif
                     62: #define CC1_SPEC       ""
                     63: 
                     64: #ifndef CC1PLUS_SPEC
                     65: #define CC1PLUS_SPEC "%{!fgnu-binutils: -fno-gnu-binutils}"
                     66: #endif
                     67: 
                     68: #ifdef ASM_SPEC
                     69: #undef ASM_SPEC
                     70: #endif
                     71: #define ASM_SPEC       ""
                     72: 
                     73: #ifdef  LINK_SPEC
                     74: #undef  LINK_SPEC
                     75: #endif
                     76: #define LINK_SPEC      "%{v*: -v}                           \
                     77:                         %{pic-none: -noshrlib} %{noshrlib}  \
                     78:                        %{!pic-none: -warn_nopic}           \
                     79:                         %{nostdlib} %{glue}"
                     80: 
                     81: #ifdef  LIB_SPEC
                     82: #undef  LIB_SPEC
                     83: #endif
                     84: 
                     85: /* For now, force static libraries instead of shared, but do so that
                     86:    does not use -noshrlib, since the old linker does not provide it.  */
                     87: 
                     88: #define LIB_SPEC "%{!pic-none: %{!pic-lib: -L/usr/ccs/lib }} -lc"
                     89: 
                     90: #ifdef  LIBG_SPEC
                     91: #undef  LIBG_SPEC
                     92: #endif
                     93: #define LIBG_SPEC      ""
                     94: 
                     95: #ifdef  STARTFILE_SPEC
                     96: #undef  STARTFILE_SPEC
                     97: #endif
                     98: #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
                     99: 
                    100: #ifdef  MACHINE_TYPE
                    101: #undef  MACHINE_TYPE
                    102: #endif
                    103: 
                    104: #define MACHINE_TYPE   ((!TARGET_486) ? "80386 running OSF/1 with OSF/rose objects" :  \
                    105:                                         "80486 running OSF/1 with OSF/rose objects")
                    106: 
                    107: #ifdef  MD_EXEC_PREFIX
                    108: #undef  MD_EXEC_PREFIX
                    109: #endif
                    110: #define MD_EXEC_PREFIX         "/usr/ccs/gcc/"
                    111: 
                    112: #ifdef  MD_STARTFILE_PREFIX
                    113: #undef  MD_STARTFILE_PREFIX
                    114: #endif
                    115: #define MD_STARTFILE_PREFIX    "/usr/ccs/lib/"
                    116: 
                    117: /* Tell final.c we don't need a label passed to mcount.  */
                    118: #define NO_PROFILE_DATA
                    119: 
                    120: #undef  FUNCTION_PROFILER
                    121: #define FUNCTION_PROFILER(FILE, LABELNO) fprintf (FILE, "\tcall _mcount\n")
                    122: 
                    123: /* Tell collect that the object format is OSF/rose.  */
                    124: #define OBJECT_FORMAT_ROSE
                    125: 
                    126: /* Use atexit for static constructors/destructors, instead of defining
                    127:    our own exit function.  */
                    128: #define HAVE_ATEXIT
                    129: 
                    130: /* Define this macro meaning that gcc should find the library 'libgcc.a'
                    131:    by hand, rather than passing the argeument '-lgcc' to tell the linker
                    132:    to do the search */
                    133: #define LINK_LIBGCC_SPECIAL
                    134: 
                    135: /* Defines to be able to build libgcc.a with GCC.  */
                    136: 
                    137: #define perform_udivsi3(a,b)                                           \
                    138: {                                                                      \
                    139:   register int dx asm("dx");                                           \
                    140:   register int ax asm("ax");                                           \
                    141:                                                                        \
                    142:   dx = 0;                                                              \
                    143:   ax = a;                                                              \
                    144:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
                    145:   return ax;                                                           \
                    146: }
                    147: 
1.1.1.2 ! root      148: #define perform_divsi3(a,b)                                            \
1.1       root      149: {                                                                      \
                    150:   register int dx asm("dx");                                           \
                    151:   register int ax asm("ax");                                           \
                    152:                                                                        \
                    153:   ax = a;                                                              \
                    154:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
                    155:   return ax;                                                           \
                    156: }
                    157: 
                    158: #define perform_umodsi3(a,b)                                           \
                    159: {                                                                      \
                    160:   register int dx asm("dx");                                           \
                    161:   register int ax asm("ax");                                           \
                    162:                                                                        \
                    163:   dx = 0;                                                              \
                    164:   ax = a;                                                              \
                    165:   asm ("divl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b), "d" (dx));        \
                    166:   return dx;                                                           \
                    167: }
                    168: 
1.1.1.2 ! root      169: #define perform_modsi3(a,b)                                            \
1.1       root      170: {                                                                      \
                    171:   register int dx asm("dx");                                           \
                    172:   register int ax asm("ax");                                           \
                    173:                                                                        \
                    174:   ax = a;                                                              \
                    175:   asm ("cltd\n\tidivl %3" : "=a" (ax), "=d" (dx) : "a" (ax), "g" (b)); \
                    176:   return dx;                                                           \
                    177: }
                    178: 
1.1.1.2 ! root      179: #define perform_fixdfsi(a)                                             \
1.1       root      180: {                                                                      \
                    181:   auto unsigned short ostatus;                                         \
                    182:   auto unsigned short nstatus;                                         \
                    183:   auto int ret;                                                                \
                    184:                                                                        \
                    185:   &ostatus;                    /* guarantee these land in memory */    \
                    186:   &nstatus;                                                            \
                    187:   &ret;                                                                        \
                    188:                                                                        \
                    189:   asm volatile ("fnstcw %0" : "=m" (ostatus));                         \
                    190:   nstatus = ostatus | 0x0c00;                                          \
                    191:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus));                \
                    192:   asm volatile ("fldl %0" : /* no outputs */ : "m" (a));               \
                    193:   asm volatile ("fistpl %0" : "=m" (ret));                             \
1.1.1.2 ! root      194:   asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus));                \
1.1       root      195:                                                                        \
                    196:   return ret;                                                          \
                    197: }

unix.superglobalmegacorp.com

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