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