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

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