Annotation of gcc/config/m68k/3b1.h, revision 1.1.1.3

1.1       root        1: /* Definitions of target machine for GNU compiler.
                      2:    AT&T UNIX PC version (pc7300, 3b1)
1.1.1.3 ! root        3:    Written by Alex Crain ([email protected]).
1.1       root        4: 
1.1.1.3 ! root        5:    Copyright (C) 1987, 1993 Free Software Foundation, Inc.
1.1       root        6: 
                      7: This file is part of GNU CC.
                      8: 
                      9: GNU CC is free software; you can redistribute it and/or modify
                     10: it under the terms of the GNU General Public License as published by
                     11: the Free Software Foundation; either version 2, or (at your option)
                     12: any later version.
                     13: 
                     14: GNU CC is distributed in the hope that it will be useful,
                     15: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     16: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     17: GNU General Public License for more details.
                     18: 
                     19: You should have received a copy of the GNU General Public License
                     20: along with GNU CC; see the file COPYING.  If not, write to
                     21: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                     22: 
                     23: #define SGS_SWITCH_TABLES      /* Different switch table handling */
                     24: 
                     25: #include "m68k/hp320.h"
                     26: 
                     27: /* See m68k.h.  0 means 680[01]0 with no 68881.  */
                     28: 
                     29: #undef TARGET_DEFAULT
                     30: #define        TARGET_DEFAULT 0
                     31: 
                     32: /* Don't try using XFmode.  */
                     33: #undef LONG_DOUBLE_TYPE_SIZE
                     34: #define LONG_DOUBLE_TYPE_SIZE 64
                     35: 
                     36: /* -m68020 requires special flags to the assembler.  */
                     37: 
                     38: #undef ASM_SPEC
                     39: #define ASM_SPEC "%{m68020:-68020}%{!m68020:-68010} %{m68881:-68881}"
                     40: 
                     41: /* we use /lib/libp/lib*  when profiling */
                     42: 
                     43: #undef LIB_SPEC
                     44: #define LIB_SPEC "%{!shlib:%{p:-L/lib/libp} %{pg:-L/lib/libp} -lc}"
                     45: 
                     46: /* shared libraries need to use crt0s.o  */
                     47: 
                     48: #undef STARTFILE_SPEC
                     49: #define STARTFILE_SPEC \
                     50:   "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\
                     51:    %{shlib:crt0s.o%s shlib.ifile%s} "
                     52: 
                     53: /* cpp has to support a #sccs directive for the /usr/include files */
                     54: 
                     55: #define SCCS_DIRECTIVE
                     56: 
                     57: /* Make output for SDB.  */
                     58: 
                     59: #define SDB_DEBUGGING_INFO
                     60: 
                     61: /* The .file command should always begin the output.  */
                     62: 
                     63: #undef ASM_FILE_START
                     64: #define ASM_FILE_START(FILE) \
                     65: output_file_directive ((FILE), main_input_filename)
                     66: 
                     67: /* Don't try to define `gcc_compiled.' since the assembler might not
                     68:    accept symbols with periods and GDB doesn't run on this machine anyway.  */
                     69: #define ASM_IDENTIFY_GCC(FILE)
                     70: 
                     71: /* Define __HAVE_68881__ in preprocessor if -m68881 is specified.
                     72:    This will control the use of inline 68881 insns in certain macros.  */
                     73: 
                     74: #undef CPP_SPEC
                     75: #define CPP_SPEC "%{m68881:-D__HAVE_68881__}"
                     76: 
                     77: /* Names to predefine in the preprocessor for this target machine.  */
                     78: /* [email protected] says mc68000 and m68k should not be here.  */
                     79: 
                     80: #undef CPP_PREDEFINES
1.1.1.2   root       81: #define CPP_PREDEFINES "-Dmc68k -Dunix -Dunixpc -D__motorola__ -Asystem(unix)  -Asystem(svr3) -Acpu(m68k) -Amachine(m68k)"
1.1       root       82: 
                     83: #undef REGISTER_NAMES
                     84: #define REGISTER_NAMES \
                     85: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",       \
                     86:  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",       \
                     87:  "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"}
                     88: 
                     89: /* Specify how to pad function arguments.
                     90:    Value should be `upward', `downward' or `none'.
                     91:    Same as the default, except no padding for large or variable-size args.  */
                     92: 
                     93: #define FUNCTION_ARG_PADDING(MODE, TYPE)                               \
                     94:   (((MODE) == BLKmode                                                  \
                     95:     ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST           \
                     96:        && int_size_in_bytes (TYPE) < PARM_BOUNDARY / BITS_PER_UNIT)    \
                     97:     : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY)                         \
                     98:    ? downward : none)
                     99: 
                    100: /* Override part of the obstack macros.  */
                    101: 
                    102: #define __PTR_TO_INT(P) ((int)(P))
                    103: #define __INT_TO_PTR(P) ((char *)(P))
                    104: 
                    105: /* The 3b1 does not have `atexit'.  */
                    106: 
                    107: #undef HAVE_ATEXIT
                    108: 
                    109: /* Override parts of m68k.h to fit the SGS-3b1 assembler.  */
                    110: 
                    111: #undef TARGET_VERSION
                    112: #undef ASM_FORMAT_PRIVATE_NAME
                    113: #undef ASM_OUTPUT_DOUBLE
                    114: #undef ASM_OUTPUT_FLOAT
                    115: #undef ASM_OUTPUT_ALIGN
                    116: #undef ASM_OUTPUT_SOURCE_FILENAME
                    117: #undef ASM_OUTPUT_SOURCE_LINE
                    118: #undef PRINT_OPERAND_ADDRESS
                    119: #undef ASM_GENERATE_INTERNAL_LABEL
                    120: #undef FUNCTION_PROFILER
                    121: #undef ASM_OUTPUT_ADDR_VEC_ELT
                    122: #undef ASM_OUTPUT_ADDR_DIFF_ELT
                    123: #undef ASM_OUTPUT_INTERNAL_LABEL
                    124: #undef ASM_OUTPUT_OPCODE
                    125: #undef ASM_OUTPUT_LOCAL
                    126: #undef ASM_OUTPUT_LABELREF
                    127: #undef ASM_OUTPUT_ASCII
                    128: 
                    129: #define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T unixpc syntax)");
                    130: 
                    131: /* Store in OUTPUT a string (made with alloca) containing
                    132:    an assembler-name for a local static variable named NAME.
                    133:    LABELNO is an integer which is different for each call.  */
                    134: 
                    135: #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
                    136: ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12),   \
                    137:   sprintf ((OUTPUT), "%s_%%%d", (NAME), (LABELNO)))
                    138: 
                    139: /* The unixpc doesn't know about double's and float's */
                    140: 
                    141: #define ASM_OUTPUT_DOUBLE(FILE,VALUE)  \
                    142: do { long l[2];                                                \
                    143:      REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);           \
                    144:      fprintf (FILE, "\tlong 0x%x,0x%x\n", l[0], l[1]); \
                    145:    } while (0)
                    146: 
                    147: #undef ASM_OUTPUT_LONG_DOUBLE
                    148: #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE)                             \
                    149: do { long l[3];                                                                \
                    150:      REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);                      \
                    151:      fprintf (FILE, "\tlong 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]);      \
                    152:    } while (0)
                    153: 
                    154: /* This is how to output an assembler line defining a `float' constant.  */
                    155: 
                    156: #define ASM_OUTPUT_FLOAT(FILE,VALUE)  \
                    157: do { long l;                                   \
                    158:      REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);   \
                    159:      fprintf ((FILE), "\tlong 0x%x\n", l);     \
                    160:    } while (0)
                    161: 
                    162: #define ASM_OUTPUT_ALIGN(FILE,LOG)     \
                    163:   if ((LOG) == 1)                      \
                    164:     fprintf (FILE, "\teven\n");        \
                    165:   else if ((LOG) != 0)                 \
                    166:     abort ();
                    167: 
                    168: /* This is how to output an assembler line
                    169:    that says to advance the location counter by SIZE bytes.  */
                    170: 
                    171: #undef ASM_OUTPUT_SKIP
                    172: #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
                    173:   fprintf (FILE, "\tspace %d\n", (SIZE))
                    174: 
                    175: /* Can't use ASM_OUTPUT_SKIP in text section; it doesn't leave 0s.  */
                    176: 
                    177: #define ASM_NO_SKIP_IN_TEXT 1
                    178: 
                    179: /* The beginnings of sdb support... */
                    180: 
                    181: #define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
1.1.1.2   root      182:   do { fprintf (FILE, "\tfile\t");             \
                    183:        output_quoted_string (FILE, FILENAME);  \
                    184:        fprintf (FILE, "\n");                   \
                    185:   } while (0)
1.1       root      186: 
                    187: #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO)   \
                    188:   fprintf (FILE, "\tln\t%d\n",                 \
                    189:           (sdb_begin_function_line             \
                    190:            ? last_linenum - sdb_begin_function_line : 1))
                    191: 
                    192: /* Yet another null terminated string format. */
                    193: 
                    194: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
1.1.1.3 ! root      195:   do { register int sp = 0, lp = 0; \
1.1       root      196:     fprintf ((FILE), "\tbyte\t"); \
                    197:   loop: \
                    198:     if ((PTR)[sp] > ' ' && ! ((PTR)[sp] & 0x80) && (PTR)[sp] != '\\') \
                    199:       { lp += 3; \
                    200:        fprintf ((FILE), "'%c", (PTR)[sp]); } \
                    201:     else \
                    202:       { lp += 5; \
                    203:        fprintf ((FILE), "0x%x", (PTR)[sp]); } \
                    204:     if (++sp < (LEN)) \
                    205:       {        if (lp > 60) \
                    206:          { lp = 0; \
                    207:            fprintf ((FILE), "\n\t%s ", ASCII_DATA_ASM_OP); }   \
                    208:        else \
                    209:          putc (',', (FILE)); \
                    210:        goto loop; } \
1.1.1.3 ! root      211:     putc ('\n', (FILE)); } while (0)
1.1       root      212: 
                    213: /* Note that in the case of the movhi which fetches an element of
                    214:    an ADDR_DIFF_VEC the offset output is too large by 2.
                    215:    This is because the 3b1 assembler refuses to subtract 2.
                    216:    ASM_OUTPUT_CASE_LABEL, below, compensates for this.  */
                    217: 
                    218: #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
                    219: { register rtx reg1, reg2, breg, ireg;                                 \
                    220:   register rtx addr = ADDR;                                            \
                    221:   rtx offset;                                                          \
                    222:   switch (GET_CODE (addr))                                             \
                    223:     {                                                                  \
                    224:     case REG:                                                          \
                    225:       fprintf (FILE, "(%s)", reg_names[REGNO (addr)]);                 \
                    226:       break;                                                           \
                    227:     case PRE_DEC:                                                      \
                    228:       fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]);      \
                    229:       break;                                                           \
                    230:     case POST_INC:                                                     \
                    231:       fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]);      \
                    232:       break;                                                           \
                    233:     case PLUS:                                                         \
                    234:       reg1 = 0;        reg2 = 0;                                               \
                    235:       ireg = 0;        breg = 0;                                               \
                    236:       offset = 0;                                                      \
                    237:       if (CONSTANT_ADDRESS_P (XEXP (addr, 0)))                         \
                    238:        {                                                               \
                    239:          offset = XEXP (addr, 0);                                      \
                    240:          addr = XEXP (addr, 1);                                        \
                    241:        }                                                               \
                    242:       else if (CONSTANT_ADDRESS_P (XEXP (addr, 1)))                    \
                    243:        {                                                               \
                    244:          offset = XEXP (addr, 1);                                      \
                    245:          addr = XEXP (addr, 0);                                        \
                    246:        }                                                               \
                    247:       if (GET_CODE (addr) != PLUS) ;                                   \
                    248:       else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND)               \
                    249:        {                                                               \
                    250:          reg1 = XEXP (addr, 0);                                        \
                    251:          addr = XEXP (addr, 1);                                        \
                    252:        }                                                               \
                    253:       else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND)               \
                    254:        {                                                               \
                    255:          reg1 = XEXP (addr, 1);                                        \
                    256:          addr = XEXP (addr, 0);                                        \
                    257:        }                                                               \
                    258:       else if (GET_CODE (XEXP (addr, 0)) == MULT)                      \
                    259:        {                                                               \
                    260:          reg1 = XEXP (addr, 0);                                        \
                    261:          addr = XEXP (addr, 1);                                        \
                    262:        }                                                               \
                    263:       else if (GET_CODE (XEXP (addr, 1)) == MULT)                      \
                    264:        {                                                               \
                    265:          reg1 = XEXP (addr, 1);                                        \
                    266:          addr = XEXP (addr, 0);                                        \
                    267:        }                                                               \
                    268:       else if (GET_CODE (XEXP (addr, 0)) == REG)                       \
                    269:        {                                                               \
                    270:          reg1 = XEXP (addr, 0);                                        \
                    271:          addr = XEXP (addr, 1);                                        \
                    272:        }                                                               \
                    273:       else if (GET_CODE (XEXP (addr, 1)) == REG)                       \
                    274:        {                                                               \
                    275:          reg1 = XEXP (addr, 1);                                        \
                    276:          addr = XEXP (addr, 0);                                        \
                    277:        }                                                               \
                    278:       if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT            \
                    279:          || GET_CODE (addr) == SIGN_EXTEND)                            \
                    280:        { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; }     \
                    281: /*  for OLD_INDEXING                                                   \
                    282:       else if (GET_CODE (addr) == PLUS)                                        \
                    283:        {                                                               \
                    284:          if (GET_CODE (XEXP (addr, 0)) == REG)                         \
                    285:            {                                                           \
                    286:              reg2 = XEXP (addr, 0);                                    \
                    287:              addr = XEXP (addr, 1);                                    \
                    288:            }                                                           \
                    289:          else if (GET_CODE (XEXP (addr, 1)) == REG)                    \
                    290:            {                                                           \
                    291:              reg2 = XEXP (addr, 1);                                    \
                    292:              addr = XEXP (addr, 0);                                    \
                    293:            }                                                           \
                    294:        }                                                               \
                    295:   */                                                                   \
                    296:       if (offset != 0) { if (addr != 0) abort (); addr = offset; }     \
                    297:       if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND                     \
                    298:                    || GET_CODE (reg1) == MULT))                        \
                    299:          || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2))))         \
                    300:        { breg = reg2; ireg = reg1; }                                   \
                    301:       else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1)))                \
                    302:        { breg = reg1; ireg = reg2; }                                   \
                    303:       if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF)      \
                    304:         { int scale = 1;                                               \
                    305:          if (GET_CODE (ireg) == MULT)                                  \
                    306:            { scale = INTVAL (XEXP (ireg, 1));                          \
                    307:              ireg = XEXP (ireg, 0); }                                  \
                    308:          if (GET_CODE (ireg) == SIGN_EXTEND)                           \
                    309:            fprintf (FILE, "LD%%%d(%%pc,%s.w",                          \
                    310:                     CODE_LABEL_NUMBER (XEXP (addr, 0)),                \
                    311:                     reg_names[REGNO (XEXP (ireg, 0))]);                \
                    312:          else                                                          \
                    313:            fprintf (FILE, "LD%%%d(%%pc,%s.l",                          \
                    314:                     CODE_LABEL_NUMBER (XEXP (addr, 0)),                \
                    315:                     reg_names[REGNO (ireg)]);                          \
                    316:          if (scale != 1) fprintf (FILE, "*%d", scale);                 \
                    317:          fprintf (FILE, ")");                                          \
                    318:          break; }                                                      \
                    319:       if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF)      \
                    320:         { fprintf (FILE, "LD%%%d(%%pc,%s.l",                           \
                    321:                   CODE_LABEL_NUMBER (XEXP (addr, 0)),                  \
                    322:                   reg_names[REGNO (breg)]);                            \
                    323:          putc (')', FILE);                                             \
                    324:          break; }                                                      \
                    325:       if (ireg != 0 || breg != 0)                                      \
                    326:        { int scale = 1;                                                \
                    327:          if (breg == 0)                                                \
                    328:            abort ();                                                   \
                    329:          if (addr != 0)                                                \
                    330:            output_addr_const (FILE, addr);                             \
                    331:          fprintf (FILE, "(%s", reg_names[REGNO (breg)]);               \
                    332:          if (ireg != 0)                                                \
                    333:            putc (',', FILE);                                           \
                    334:          if (ireg != 0 && GET_CODE (ireg) == MULT)                     \
                    335:            { scale = INTVAL (XEXP (ireg, 1));                          \
                    336:              ireg = XEXP (ireg, 0); }                                  \
                    337:          if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND)              \
                    338:            fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]);  \
                    339:          else if (ireg != 0)                                           \
                    340:            fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]);            \
                    341:          if (scale != 1) fprintf (FILE, "*%d", scale);                 \
                    342:          putc (')', FILE);                                             \
                    343:          break;                                                        \
                    344:        }                                                               \
                    345:       else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF)              \
                    346:        { fprintf (FILE, "LD%%%d(%%pc,%s.w)",                           \
                    347:                   CODE_LABEL_NUMBER (XEXP (addr, 0)),                  \
                    348:                   reg_names[REGNO (reg1)]);                            \
                    349:          break; }                                                      \
                    350:     default:                                                           \
                    351:       if (GET_CODE (addr) == CONST_INT                                 \
                    352:          && INTVAL (addr) < 0x8000                                     \
                    353:          && INTVAL (addr) >= -0x8000)                                  \
                    354:        fprintf (FILE, "%d", INTVAL (addr));                            \
                    355:       else                                                             \
                    356:         output_addr_const (FILE, addr);                                        \
                    357:     }}
                    358: 
                    359: #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)        \
                    360:   sprintf ((LABEL), "%s%%%d", (PREFIX), (NUM))
                    361: 
                    362: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)     \
                    363:     fprintf (FILE, "%s%%%d:\n", PREFIX, NUM)
                    364: 
                    365: /* Must put address in  %a0 , not  %d0 . -- LGM, 7/15/88 */
                    366: #define FUNCTION_PROFILER(FILE, LABEL_NO)      \
                    367:     fprintf (FILE, "\tmov.l &LP%%%d,%%a0\n\tjsr mcount\n", (LABEL_NO))
                    368: 
                    369: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)   \
                    370:     fprintf (FILE, "\tlong L%%%d\n", (VALUE))
                    371: 
                    372: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)     \
                    373:     fprintf (FILE, "\tshort L%%%d-L%%%d\n", (VALUE), (REL))
                    374: 
                    375: /* ihnp4!lmayk!lgm says that `short 0' triggers assembler bug;
                    376:    `short L%nn-L%nn' supposedly works.  */
                    377: #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE)                   \
                    378:   if (! RTX_INTEGRATED_P (TABLE))                                      \
                    379:     fprintf (FILE, "\tswbeg &%d\n%s%%%d:\n",                           \
                    380:             XVECLEN (PATTERN (TABLE), 1), (PREFIX), (NUM));            \
                    381:   else                                                                 \
                    382:     fprintf (FILE, "\tswbeg &%d\n%s%%%d:\n\tshort %s%%%d-%s%%%d\n",    \
                    383:             XVECLEN (PATTERN (TABLE), 1) + 1, (PREFIX), (NUM),         \
                    384:             (PREFIX), (NUM), (PREFIX), (NUM))
                    385: 
                    386: /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
                    387:    Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
                    388:    fails to assemble.  Luckily "LDnnn(pc,d0.l*2)" produces the results
                    389:    we want.  This difference can be accommodated by making the assembler
                    390:    define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
                    391:    string, as necessary.  This is accomplished via the ASM_OUTPUT_CASE_END
                    392:    macro. */
                    393: 
                    394: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE)                            \
                    395: { if (switch_table_difference_label_flag)                              \
                    396:     fprintf (FILE, "\tset LD%%%d,L%%%d-LI%%%d\n", (NUM), (NUM), (NUM));        \
                    397:   switch_table_difference_label_flag = 0; }
                    398: 
                    399: int switch_table_difference_label_flag;
                    400: 
                    401: #define ASM_OUTPUT_OPCODE(FILE, PTR)                   \
                    402: { if ((PTR)[0] == 'j' && (PTR)[1] == 'b')              \
                    403:     { ++(PTR);                                         \
                    404:       while (*(PTR) != ' ')                            \
                    405:        { putc (*(PTR), (FILE)); ++(PTR); }             \
                    406:       fprintf ((FILE), ".w"); }                                \
                    407:   else if ((PTR)[0] == 's')                            \
                    408:     {                                                  \
                    409:       if (!strncmp ((PTR), "swap", 4))                 \
                    410:        { fprintf ((FILE), "swap.w"); (PTR) += 4; }     \
                    411:     }                                                  \
                    412:   else if ((PTR)[0] == 'f')                            \
                    413:     {                                                  \
                    414:       if (!strncmp ((PTR), "fmove", 5))                        \
                    415:        { fprintf ((FILE), "fmov"); (PTR) += 5; }       \
                    416:       else if (!strncmp ((PTR), "fbne", 4))            \
                    417:        { fprintf ((FILE), "fbneq"); (PTR) += 4; }      \
                    418:     }                                                  \
                    419: /* MOVE, MOVEA, MOVEQ, MOVEC ==> MOV   */              \
                    420:   else if ((PTR)[0] == 'm' && (PTR)[1] == 'o'          \
                    421:           && (PTR)[2] == 'v' && (PTR)[3] == 'e')       \
                    422:     { fprintf ((FILE), "mov"); (PTR) += 4;             \
                    423:        if ((PTR)[0] == 'q' || (PTR)[0] == 'a'          \
                    424:           || (PTR)[0] == 'c') (PTR)++; }               \
                    425: /* SUB, SUBQ, SUBA, SUBI ==> SUB */                    \
                    426:   else if ((PTR)[0] == 's' && (PTR)[1] == 'u'          \
                    427:           && (PTR)[2] == 'b')                          \
                    428:     { fprintf ((FILE), "sub"); (PTR) += 3;             \
                    429:        if ((PTR)[0] == 'q' || (PTR)[0] == 'i'          \
                    430:           || (PTR)[0] == 'a') (PTR)++; }               \
                    431: /* CMP, CMPA, CMPI, CMPM ==> CMP       */              \
                    432:   else if ((PTR)[0] == 'c' && (PTR)[1] == 'm'          \
                    433:           && (PTR)[2] == 'p')                          \
                    434:     { fprintf ((FILE), "cmp"); (PTR) += 3;             \
                    435:        if ((PTR)[0] == 'a' || (PTR)[0] == 'i'          \
                    436:           || (PTR)[0] == 'm') (PTR)++; }               \
                    437: }
                    438: 
                    439: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
                    440: ( fputs ("\tlcomm ", (FILE)),                  \
                    441:   assemble_name ((FILE), (NAME)),              \
                    442:   fprintf ((FILE), ",%u\n", (ROUNDED)))
                    443: 
                    444: #define ASM_OUTPUT_LABELREF(FILE,NAME) \
                    445:   fprintf (FILE, "%s", NAME)
                    446: 
                    447: /* Override usual definitions of SDB output macros.
                    448:    These definitions differ only in the absence of the period
                    449:    at the beginning of the name of the directive
                    450:    and in the use of `~' as the symbol for the current location.  */
                    451: 
                    452: #define PUT_SDB_SCL(a) fprintf(asm_out_file, "\tscl\t%d;", (a))
                    453: #define PUT_SDB_INT_VAL(a) fprintf (asm_out_file, "\tval\t%d;", (a))
                    454: #define PUT_SDB_VAL(a)                         \
                    455: ( fputs ("\tval\t", asm_out_file),             \
                    456:   output_addr_const (asm_out_file, (a)),       \
                    457:   fputc (';', asm_out_file))
                    458: 
                    459: #define PUT_SDB_DEF(a)                         \
                    460: do { fprintf (asm_out_file, "\tdef\t");        \
                    461:      ASM_OUTPUT_LABELREF (asm_out_file, a);    \
                    462:      fprintf (asm_out_file, ";"); } while (0)
                    463: 
                    464: #define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s;",a)
                    465: #define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file)
                    466: #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o;", a)
                    467: #define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d;", a)
                    468: #define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t")
                    469: 
                    470: #define PUT_SDB_TAG(a)                         \
                    471: do { fprintf (asm_out_file, "\ttag\t");        \
                    472:      ASM_OUTPUT_LABELREF (asm_out_file, a);    \
                    473:      fprintf (asm_out_file, ";"); } while (0)
                    474: 
                    475: #define PUT_SDB_BLOCK_START(LINE)              \
                    476:   fprintf (asm_out_file,                       \
                    477:           "\tdef\t~bb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n",       \
                    478:           (LINE))
                    479: 
                    480: #define PUT_SDB_BLOCK_END(LINE)                        \
                    481:   fprintf (asm_out_file,                       \
                    482:           "\tdef\t~eb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n",       \
                    483:           (LINE))
                    484: 
                    485: #define PUT_SDB_FUNCTION_START(LINE)           \
                    486:   fprintf (asm_out_file,                       \
                    487:           "\tdef\t~bf;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n",       \
                    488:           (LINE))
                    489: 
                    490: #define PUT_SDB_FUNCTION_END(LINE)             \
                    491:   fprintf (asm_out_file,                       \
                    492:           "\tdef\t~ef;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n",       \
                    493:           (LINE))
                    494: 
                    495: #define PUT_SDB_EPILOGUE_END(NAME)             \
                    496:   fprintf (asm_out_file,                       \
                    497:           "\tdef\t%s;\tval\t~;\tscl\t-1;\tendef\n",    \
                    498:           (NAME))
                    499: 
                    500: #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
                    501:   sprintf ((BUFFER), "~%dfake", (NUMBER));
                    502: 
                    503: /* Define subroutines to call to handle multiply, divide, and remainder.
                    504:    Use the subroutines that the 3b1's library provides.
                    505:    The `*' prevents an underscore from being prepended by the compiler.  */
                    506: 
                    507: #define DIVSI3_LIBCALL "*ldiv"
                    508: #define UDIVSI3_LIBCALL "*uldiv"
                    509: #define MODSI3_LIBCALL "*lrem"
                    510: #define UMODSI3_LIBCALL "*ulrem"
                    511: #define MULSI3_LIBCALL "*lmul"
                    512: #define UMULSI3_LIBCALL "*ulmul"
1.1.1.2   root      513: 
                    514: /* Definitions for collect2.  */
                    515: 
                    516: #define OBJECT_FORMAT_COFF
                    517: #define NO_SYS_SIGLIST
                    518: #define MY_ISCOFF(magic) \
                    519:  ((magic) == MC68KWRMAGIC || (magic) == MC68KROMAGIC || (magic) == MC68KPGMAGIC)

unix.superglobalmegacorp.com

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