|
|
1.1.1.3 ! root 1: /* Definitions of target machine for GNU compiler, ! 2: SysV68 Motorola 3300 Delta Series. ! 3: Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc. ! 4: Coptributed by Abramo and Roberto Bagnara ([email protected]) ! 5: based on Alex Crain's 3B1 definitions. 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 MOTOROLA /* Use Motorola syntax rather than "MIT" */ 1.1.1.3 ! root 24: #define MOTOROLA_BSR /* Use Span-dependent optimized bsr */ 1.1 root 25: #define SGS /* Uses SGS assembler */ 26: #define SGS_CMP_ORDER /* Takes cmp operands in reverse order */ 27: #define SGS_SWAP_W /* Use swap.w rather than just plain swap */ 28: 29: #define NO_DOLLAR_IN_LABEL 30: #define NO_DOT_IN_LABEL 31: 32: #include "m68k/m68k.h" 33: 1.1.1.3 ! root 34: /* See m68k.h. 0407 means 68020-68040. */ 1.1 root 35: 36: #ifndef TARGET_DEFAULT 1.1.1.3 ! root 37: #define TARGET_DEFAULT 0407 1.1 root 38: #endif 39: 1.1.1.3 ! root 40: /* -m[c]6800 requires special flag to the assembler. */ ! 41: ! 42: #undef ASM_SPEC ! 43: #define ASM_SPEC "%{m68000:-p 000}%{mc68000:-p 000}" ! 44: 1.1 root 45: /* NYI: FP= is equivalent to -msoft-float */ 46: 47: /* We use /lib/libp/lib* when profiling. */ 48: 49: /* NYI: if FP=M68881U library is -lc881u */ 50: /* NYI: if FP= library is -lc. */ 51: /* Default for us: FP=M68881 library is -lc881 */ 52: #undef LIB_SPEC 53: #define LIB_SPEC "%{!shlib:%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp} -lc881}" 54: 55: #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" 56: 57: /* Shared libraries need to use crt0s.o */ 58: 59: #undef STARTFILE_SPEC 60: #define STARTFILE_SPEC \ 61: "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ 62: %{shlib:crt0s.o%s shlib.ifile%s} " 63: 64: /* Generate calls to memcpy, memcmp and memset. */ 65: 66: #define TARGET_MEM_FUNCTIONS 67: 68: /* size_t is unsigned int. */ 69: 70: #define SIZE_TYPE "unsigned int" 71: 72: /* Every structure or union's size must be a multiple of 2 bytes. */ 73: 74: #define STRUCTURE_SIZE_BOUNDARY 16 1.1.1.2 root 75: 76: /* Allocation boundary (in *bits*) for storing arguments in argument list. */ 77: /* Be compatible with native compiler. */ 78: #undef PARM_BOUNDARY 79: #define PARM_BOUNDARY 16 1.1 root 80: 81: /* cpp has to support a #sccs directive for the /usr/include files */ 82: 83: #define SCCS_DIRECTIVE 84: 85: /* Make output for SDB. */ 86: 87: #define SDB_DEBUGGING_INFO 88: 1.1.1.2 root 89: #undef REGISTER_PREFIX 90: #define REGISTER_PREFIX "%" 91: 1.1.1.3 ! root 92: #if 0 ! 93: #undef LOCAL_LABEL_PREFIX ! 94: #define LOCAL_LABEL_PREFIX "~" ! 95: #endif ! 96: 1.1.1.2 root 97: #undef IMMEDIATE_PREFIX 98: #define IMMEDIATE_PREFIX "&" 99: 1.1 root 100: #undef REGISTER_NAMES 101: #define REGISTER_NAMES \ 102: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ 103: "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", \ 104: "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"} 105: 1.1.1.3 ! root 106: #undef FUNCTION_EXTRA_EPILOGUE ! 107: #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ ! 108: { extern int current_function_returns_pointer; \ ! 109: if ((current_function_returns_pointer) && \ ! 110: ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ ! 111: asm_fprintf (FILE, "\tmov.l %Ra0,%Rd0\n"); } 1.1 root 112: 113: #undef FUNCTION_PROFILER 114: #define FUNCTION_PROFILER(FILE, LABEL_NO) \ 115: fprintf (FILE, "\tmov.l &LP%%%d,%%a0\n\tjsr mcount%%\n", (LABEL_NO)) 116: 117: /* This is how to output an insn to push a register on the stack. 118: It need not be very fast code. */ 119: 120: #undef ASM_OUTPUT_REG_PUSH 121: #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ 122: fprintf (FILE, "\tmov.l %s,-(%%sp)\n", reg_names[REGNO]) 123: 124: /* This is how to output an insn to pop a register from the stack. 125: It need not be very fast code. */ 126: 127: #undef ASM_OUTPUT_REG_POP 128: #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ 129: fprintf (FILE, "\tmov.l (%%sp)+,%s\n", reg_names[REGNO]) 130: 131: #undef ASM_APP_ON 132: #define ASM_APP_ON "" 133: 134: #undef ASM_APP_OFF 135: #define ASM_APP_OFF "" 136: 137: #undef TEXT_SECTION_ASM_OP 138: #define TEXT_SECTION_ASM_OP "text" 139: #undef DATA_SECTION_ASM_OP 140: #define DATA_SECTION_ASM_OP "data" 141: #undef ASCII_DATA_ASM_OP 142: #define ASCII_DATA_ASM_OP "byte" 143: 144: /* The file command should always begin the output. */ 145: 146: #undef ASM_FILE_START 147: #define ASM_FILE_START(FILE) \ 148: output_file_directive ((FILE), main_input_filename) 149: 1.1.1.3 ! root 150: /* The sysV68 assembler does not accept dots in labels. ! 151: Let's use percent instead */ 1.1 root 152: 1.1.1.3 ! root 153: #define ASM_IDENTIFY_GCC(FILE) fputs("gcc2_compiled%:\n", FILE) 1.1 root 154: 155: /* Names to predefine in the preprocessor for this target machine. */ 156: /* [email protected] says mc68000 and m68k should not be here, 157: on the other hand I don't care what he says. */ 158: 159: #undef CPP_PREDEFINES 1.1.1.2 root 160: #define CPP_PREDEFINES "-Dm68k -Dunix -DsysV68 -D__motorola__ -Asystem(unix) -Asystem(svr3) -Acpu(m68k) -Amachine(m68k)" 1.1 root 161: 162: /* Override part of the obstack macros. */ 163: 164: #define __PTR_TO_INT(P) ((int)(P)) 165: #define __INT_TO_PTR(P) ((char *)(P)) 166: 167: #undef TARGET_VERSION 168: #define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T sysV68 syntax)"); 169: 170: /* Function calls save all but a0, a1, d0, d1, fp0, fp1. */ 171: 172: #undef CALL_USED_REGISTERS 173: #define CALL_USED_REGISTERS \ 174: {1, 1, 0, 0, 0, 0, 0, 0, \ 175: 1, 1, 0, 0, 0, 0, 0, 1, \ 176: 1, 1, 0, 0, 0, 0, 0, 0} 177: 178: /* If TARGET_68881, return SF and DF values in fp0 instead of d0. */ 179: /* NYI: If FP=M68881U return SF and DF values in d0. */ 180: /* NYI: If -mold return pointer in a0 and d0 */ 181: 182: #undef FUNCTION_VALUE 183: /* sysV68 (brain damaged) cc convention support. */ 184: #define FUNCTION_VALUE(VALTYPE,FUNC) \ 185: (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \ 186: ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \ 187: : (TREE_CODE (VALTYPE) == POINTER_TYPE \ 188: ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \ 189: : gen_rtx (REG, TYPE_MODE (VALTYPE), 0))) 190: 191: /* If TARGET_68881, SF and DF values are returned in fp0 instead of d0. */ 192: 1.1.1.3 ! root 193: /* Is LIBCALL_VALUE never called with a pointer ? */ 1.1 root 194: #undef LIBCALL_VALUE 195: #define LIBCALL_VALUE(MODE) \ 196: gen_rtx (REG, (MODE), \ 197: ((TARGET_68881 \ 198: && ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)) \ 199: ? 16 : 0)) 200: 201: /* 1 if N is a possible register number for a function value. 202: d0 may be used, and fp0 as well if -msoft-float is not specified. */ 203: 204: #undef FUNCTION_VALUE_REGNO_P 205: /* sysV68 (brain damaged) cc convention support. */ 206: #define FUNCTION_VALUE_REGNO_P(N) \ 207: ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16)) 208: 209: /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for 210: more than one register. */ 211: 212: #undef NEEDS_UNTYPED_CALL 213: #define NEEDS_UNTYPED_CALL 1 214: 215: /* This is the command to make the user-level label named NAME 216: defined for reference from other files. */ 217: 218: #undef GLOBAL_ASM_OP 219: #define GLOBAL_ASM_OP "global" 220: 221: /* Store in OUTPUT a string (made with alloca) containing 222: an assembler-name for a local static variable named NAME. 223: LABELNO is an integer which is different for each call. */ 224: 225: #undef ASM_FORMAT_PRIVATE_NAME 226: #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ 227: ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \ 228: sprintf ((OUTPUT), "%s_%%%d", (NAME), (LABELNO))) 229: 230: /* The sysV68 as doesn't know about double's and float's. */ 231: /* This is how to output an assembler line defining a `double' constant. */ 232: 233: #undef ASM_OUTPUT_DOUBLE 234: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ 235: do { long l[2]; \ 236: REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ 237: fprintf (FILE, "\tlong 0x%x,0x%x\n", l[0], l[1]); \ 238: } while (0) 239: 240: #undef ASM_OUTPUT_LONG_DOUBLE 241: #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ 242: do { long l[3]; \ 243: REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ 244: fprintf (FILE, "\tlong 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]); \ 245: } while (0) 246: 247: /* This is how to output an assembler line defining a `float' constant. */ 248: 249: #undef ASM_OUTPUT_FLOAT 250: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ 251: do { long l; \ 252: REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \ 253: fprintf ((FILE), "\tlong 0x%x\n", l); \ 254: } while (0) 255: 256: /* This is how to output an assembler line defining an `int' constant. */ 257: 258: #undef ASM_OUTPUT_INT 259: #define ASM_OUTPUT_INT(FILE,VALUE) \ 260: ( fprintf (FILE, "\tlong "), \ 261: output_addr_const (FILE, (VALUE)), \ 262: fprintf (FILE, "\n")) 263: 264: /* Likewise for `char' and `short' constants. */ 265: 266: #undef ASM_OUTPUT_SHORT 267: #define ASM_OUTPUT_SHORT(FILE,VALUE) \ 268: ( fprintf (FILE, "\tshort "), \ 269: output_addr_const (FILE, (VALUE)), \ 270: fprintf (FILE, "\n")) 271: 272: #undef ASM_OUTPUT_CHAR 273: #define ASM_OUTPUT_CHAR(FILE,VALUE) \ 274: ( fprintf (FILE, "\tbyte "), \ 275: output_addr_const (FILE, (VALUE)), \ 276: fprintf (FILE, "\n")) 277: 278: /* This is how to output an assembler line for a numeric constant byte. */ 279: 280: #undef ASM_OUTPUT_BYTE 281: #define ASM_OUTPUT_BYTE(FILE,VALUE) \ 282: fprintf (FILE, "\tbyte 0x%x\n", (VALUE)) 283: 284: /* This is how to output an assembler line 285: that says to advance the location counter 286: to a multiple of 2**LOG bytes. */ 287: 288: #undef ASM_OUTPUT_ALIGN 289: #define ASM_OUTPUT_ALIGN(FILE,LOG) \ 290: if ((LOG) == 1) \ 291: fprintf (FILE, "\teven\n"); \ 292: else if ((LOG) != 0) \ 293: abort (); 294: 295: #undef ASM_OUTPUT_SKIP 296: #define ASM_OUTPUT_SKIP(FILE,SIZE) \ 297: fprintf (FILE, "\tspace %u\n", (SIZE)) 298: 299: /* Can't use ASM_OUTPUT_SKIP in text section. */ 300: 301: #define ASM_NO_SKIP_IN_TEXT 1 302: 303: /* The beginnings of sdb support... */ 304: 305: #undef ASM_OUTPUT_SOURCE_FILENAME 306: #define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \ 1.1.1.2 root 307: do { fprintf (FILE, "\tfile\t"); \ 308: output_quoted_string (FILE, FILENAME); \ 309: fprintf (FILE, "\n"); \ 310: } while (0) 1.1 root 311: 312: #undef ASM_OUTPUT_SOURCE_LINE 313: #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) \ 314: fprintf (FILE, "\tln\t%d\n", \ 315: (sdb_begin_function_line \ 316: ? last_linenum - sdb_begin_function_line : 1)) 317: 318: /* Yet another null terminated string format. */ 319: 320: #undef ASM_OUTPUT_ASCII 321: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \ 1.1.1.3 ! root 322: do { register int sp = 0, lp = 0; \ 1.1 root 323: fprintf ((FILE), "\tbyte\t"); \ 324: loop: \ 325: if ((PTR)[sp] > ' ' && ! ((PTR)[sp] & 0x80) && (PTR)[sp] != '\\') \ 326: { lp += 3; \ 327: fprintf ((FILE), "'%c", (PTR)[sp]); } \ 328: else \ 329: { lp += 5; \ 330: fprintf ((FILE), "0x%x", (PTR)[sp]); } \ 331: if (++sp < (LEN)) \ 332: { if (lp > 60) \ 333: { lp = 0; \ 334: fprintf ((FILE), "\n\t%s ", ASCII_DATA_ASM_OP); } \ 335: else \ 336: putc (',', (FILE)); \ 337: goto loop; } \ 1.1.1.3 ! root 338: putc ('\n', (FILE)); } while (0) ! 339: ! 340: /* Output a float value (represented as a C double) as an immediate operand. ! 341: This macro is a 68k-specific macro. */ 1.1 root 342: 1.1.1.3 ! root 343: #undef ASM_OUTPUT_FLOAT_OPERAND ! 344: #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \ ! 345: do { long l; \ 1.1 root 346: REAL_VALUE_TO_TARGET_SINGLE (r, l); \ 347: /* Use hex representation even if CODE is f. as needs it. */ \ 1.1.1.3 ! root 348: fprintf ((FILE), "&0x%lx", l); \ ! 349: } while (0) ! 350: ! 351: /* Output a double value (represented as a C double) as an immediate operand. ! 352: This macro is a 68k-specific macro. */ ! 353: #undef ASM_OUTPUT_DOUBLE_OPERAND ! 354: #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ ! 355: do { long l[2]; \ ! 356: REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l); \ ! 357: fprintf ((FILE), "&0x%lx%08lx", l[0], l[1]); \ ! 358: } while (0) 1.1 root 359: 360: /* This is how to store into the string LABEL 361: the symbol_ref name of an internal numbered label where 362: PREFIX is the class of label and NUM is the number within the class. 363: This is suitable for output with `assemble_name'. */ 364: 365: #undef ASM_GENERATE_INTERNAL_LABEL 366: #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ 367: sprintf ((LABEL), "%s%%%d", (PREFIX), (NUM)) 368: 369: /* This is how to output an internal numbered label where 370: PREFIX is the class of label and NUM is the number within the class. */ 371: 372: #undef ASM_OUTPUT_INTERNAL_LABEL 373: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 374: fprintf (FILE, "%s%%%d:\n", PREFIX, NUM) 375: 376: /* This is how to output a reference to a user-level label named NAME. 377: `assemble_name' uses this. */ 378: 379: #undef ASM_OUTPUT_LABELREF 380: #define ASM_OUTPUT_LABELREF(FILE,NAME) \ 381: fprintf (FILE, "%s", NAME) 382: 383: /* This is how to output an element of a case-vector that is absolute. 384: (The 68000 does not use such vectors, 385: but we must define this macro anyway.) */ 386: 387: #undef ASM_OUTPUT_ADDR_VEC_ELT 388: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ 389: fprintf (FILE, "\tlong L%%%d\n", (VALUE)) 390: 391: /* This is how to output an element of a case-vector that is relative. */ 392: 393: #undef ASM_OUTPUT_ADDR_DIFF_ELT 394: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ 395: fprintf (FILE, "\tshort L%%%d-L%%%d\n", (VALUE), (REL)) 396: 397: #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ 398: fprintf (FILE, "\tswbeg &%d\n%s%%%d:\n", \ 399: XVECLEN (PATTERN (TABLE), 1), (PREFIX), (NUM)) 400: 1.1.1.3 ! root 401: /* sysV68 as cannot handle LD%n(%pc,%reg) */ ! 402: #define SGS_NO_LI ! 403: ! 404: /* labelno is not used here */ ! 405: #define ASM_OUTPUT_CASE_FETCH(file, labelno, regname)\ ! 406: asm_fprintf (file, "12(%Rpc,%s.", regname) 1.1 root 407: 1.1.1.3 ! root 408: #define ASM_RETURN_CASE_JUMP return "jmp 8(%%pc,%0.w)" ! 409: 1.1 root 410: /* Translate some opcodes to fit the sysV68 assembler syntax. */ 411: /* The opcodes fdmov and fsmov are guesses. */ 412: 1.1.1.2 root 413: /* [email protected] says no need for .w suffix on jumps. */ 1.1 root 414: #undef ASM_OUTPUT_OPCODE 415: #define ASM_OUTPUT_OPCODE(FILE, PTR) \ 416: { if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \ 417: { ++(PTR); \ 418: while (*(PTR) != ' ') \ 419: { putc (*(PTR), (FILE)); ++(PTR); } \ 1.1.1.2 root 420: } \ 1.1 root 421: else if ((PTR)[0] == 's') \ 422: { \ 423: if (!strncmp ((PTR), "swap", 4)) \ 424: { fprintf ((FILE), "swap.w"); (PTR) += 4; } \ 425: } \ 426: else if ((PTR)[0] == 'f') \ 427: { \ 428: if (!strncmp ((PTR), "fmove", 5)) \ 429: { fprintf ((FILE), "fmov"); (PTR) += 5; } \ 430: else if (!strncmp ((PTR), "f%$move", 7)) \ 431: { if (TARGET_68040_ONLY) \ 432: { fprintf ((FILE), "fsmov"); (PTR) += 7; } \ 433: else \ 434: { fprintf ((FILE), "fmov"); (PTR) += 7; } } \ 435: else if (!strncmp ((PTR), "f%&move", 7)) \ 436: { if (TARGET_68040_ONLY) \ 437: { fprintf ((FILE), "fdmov"); (PTR) += 7; } \ 438: else \ 439: { fprintf ((FILE), "fmov"); (PTR) += 7; } } \ 440: else if (!strncmp ((PTR), "ftst", 4)) \ 441: { fprintf ((FILE), "ftest"); (PTR) += 4; } \ 442: else if (!strncmp ((PTR), "fbne", 4)) \ 443: { fprintf ((FILE), "fbneq"); (PTR) += 4; } \ 444: else if (!strncmp ((PTR), "fsne", 4)) \ 445: { fprintf ((FILE), "fsneq"); (PTR) += 4; } \ 446: } \ 447: /* MOVE, MOVEA, MOVEQ, MOVEC ==> MOV */ \ 448: else if ((PTR)[0] == 'm' && (PTR)[1] == 'o' \ 449: && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ 450: { fprintf ((FILE), "mov"); (PTR) += 4; \ 451: if ((PTR)[0] == 'q' || (PTR)[0] == 'a' \ 452: || (PTR)[0] == 'c') (PTR)++; } \ 453: /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ 454: else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ 455: && (PTR)[2] == 'b') \ 456: { fprintf ((FILE), "sub"); (PTR) += 3; \ 457: if ((PTR)[0] == 'q' || (PTR)[0] == 'i' \ 458: || (PTR)[0] == 'a') (PTR)++; } \ 459: /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ 460: else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ 461: && (PTR)[2] == 'p') \ 462: { fprintf ((FILE), "cmp"); (PTR) += 3; \ 463: if ((PTR)[0] == 'a' || (PTR)[0] == 'i' \ 464: || (PTR)[0] == 'm') (PTR)++; } \ 465: } 466: 1.1.1.2 root 467: /* [email protected] says to pass SIZE, not ROUNDED. */ 468: 1.1 root 469: /* This says how to output an assembler line 470: to define a global common symbol. */ 471: 472: #undef ASM_OUTPUT_COMMON 473: #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ 474: ( fputs ("\tcomm ", (FILE)), \ 475: assemble_name ((FILE), (NAME)), \ 1.1.1.2 root 476: fprintf ((FILE), ",%u\n", (SIZE))) 1.1 root 477: 478: /* This says how to output an assembler line 479: to define a local common symbol. */ 480: 481: #undef ASM_OUTPUT_LOCAL 482: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ 483: ( fputs ("\tlcomm ", (FILE)), \ 484: assemble_name ((FILE), (NAME)), \ 1.1.1.2 root 485: fprintf ((FILE), ",%u\n", (SIZE))) 1.1 root 486: 487: 488: /* Override usual definitions of SDB output macros. 489: These definitions differ only in the absence of the period 490: at the beginning of the name of the directive 491: and in the use of `~' as the symbol for the current location. */ 492: 493: #define PUT_SDB_SCL(a) fprintf(asm_out_file, "\tscl\t%d;", (a)) 494: #define PUT_SDB_INT_VAL(a) fprintf (asm_out_file, "\tval\t%d;", (a)) 495: #define PUT_SDB_VAL(a) \ 496: ( fputs ("\tval\t", asm_out_file), \ 497: output_addr_const (asm_out_file, (a)), \ 498: fputc (';', asm_out_file)) 499: 500: #define PUT_SDB_DEF(a) \ 501: do { fprintf (asm_out_file, "\tdef\t"); \ 502: ASM_OUTPUT_LABELREF (asm_out_file, a); \ 503: fprintf (asm_out_file, ";"); } while (0) 504: 505: #define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s;",a) 506: #define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file) 507: #define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o;", a) 508: #define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d;", a) 509: #define PUT_SDB_START_DIM fprintf(asm_out_file, "\tdim\t") 510: #define PUT_SDB_NEXT_DIM(a) fprintf(asm_out_file, "%d,", a) 511: #define PUT_SDB_LAST_DIM(a) fprintf(asm_out_file, "%d;", a) 512: 513: #define PUT_SDB_TAG(a) \ 514: do { fprintf (asm_out_file, "\ttag\t"); \ 515: ASM_OUTPUT_LABELREF (asm_out_file, a); \ 516: fprintf (asm_out_file, ";"); } while (0) 517: 518: #define PUT_SDB_BLOCK_START(LINE) \ 519: fprintf (asm_out_file, \ 520: "\tdef\t~bb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n", \ 521: (LINE)) 522: 523: #define PUT_SDB_BLOCK_END(LINE) \ 524: fprintf (asm_out_file, \ 525: "\tdef\t~eb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n", \ 526: (LINE)) 527: 528: #define PUT_SDB_FUNCTION_START(LINE) \ 529: fprintf (asm_out_file, \ 530: "\tdef\t~bf;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n", \ 531: (LINE)) 532: 533: #define PUT_SDB_FUNCTION_END(LINE) \ 534: fprintf (asm_out_file, \ 535: "\tdef\t~ef;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n", \ 536: (LINE)) 537: 538: #define PUT_SDB_EPILOGUE_END(NAME) \ 539: fprintf (asm_out_file, \ 540: "\tdef\t%s;\tval\t~;\tscl\t-1;\tendef\n", \ 541: (NAME)) 542: 543: #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \ 544: sprintf ((BUFFER), "~%dfake", (NUMBER)); 545: 546: /* Define subroutines to call to handle multiply, divide, and remainder. 1.1.1.3 ! root 547: Use the subroutines that the sysV68's library provides. 1.1 root 548: The `*' prevents an underscore from being prepended by the compiler. */ 1.1.1.3 ! root 549: /* The '*' is also used by INIT_CUMULATIVE_ARGS */ ! 550: ! 551: #define DIVSI3_LIBCALL "*ldiv%%" ! 552: #define UDIVSI3_LIBCALL "*uldiv%%" ! 553: #define MODSI3_LIBCALL "*lrem%%" ! 554: #define UMODSI3_LIBCALL "*ulrem%%" ! 555: #define MULSI3_LIBCALL "*lmul%%" ! 556: ! 557: struct sysV68_cumulative_args ! 558: { ! 559: int offset; ! 560: int libcall; ! 561: }; ! 562: ! 563: #undef CUMULATIVE_ARGS ! 564: #define CUMULATIVE_ARGS struct sysV68_cumulative_args ! 565: ! 566: #undef INIT_CUMULATIVE_ARGS ! 567: #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \ ! 568: do {(CUM).offset = 0;\ ! 569: (CUM).libcall = (LIBNAME) && (*XSTR((LIBNAME), 0) == '*');} while(0) ! 570: ! 571: #undef FUNCTION_ARG_ADVANCE ! 572: #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! 573: ((CUM).offset += ((MODE) != BLKmode \ ! 574: ? (GET_MODE_SIZE (MODE) + 3) & ~3 \ ! 575: : (int_size_in_bytes (TYPE) + 3) & ~3)) ! 576: ! 577: #undef FUNCTION_ARG ! 578: #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! 579: (((CUM).libcall && (CUM).offset == 0) ? gen_rtx(REG, (MODE), 0)\ ! 580: : (TARGET_REGPARM && (CUM).offset < 8) ? gen_rtx (REG, (MODE), (CUM).offset / 4) : 0) ! 581: ! 582: #undef FUNCTION_ARG_PARTIAL_NREGS ! 583: #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! 584: ((TARGET_REGPARM && (CUM).offset < 8 \ ! 585: && 8 < ((CUM).offset + ((MODE) == BLKmode \ ! 586: ? int_size_in_bytes (TYPE) \ ! 587: : GET_MODE_SIZE (MODE)))) \ ! 588: ? 2 - (CUM).offset / 4 : 0) 1.1 root 589: 1.1.1.3 ! root 590: #undef FUNCTION_ARG_REGNO_P ! 591: #define FUNCTION_ARG_REGNO_P(N) (TARGET_68020 ? 0 : (N) == 0)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.