|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. HP-UX 68000/68020 version. 1.1.1.3 ! root 2: Copyright (C) 1987, 1988, 1993, 1994 Free Software Foundation, Inc. 1.1 root 3: 4: This file is part of GNU CC. 5: 6: GNU CC is free software; you can redistribute it and/or modify 7: it under the terms of the GNU General Public License as published by 8: the Free Software Foundation; either version 2, or (at your option) 9: any later version. 10: 11: GNU CC is distributed in the hope that it will be useful, 12: but WITHOUT ANY WARRANTY; without even the implied warranty of 13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14: GNU General Public License for more details. 15: 16: You should have received a copy of the GNU General Public License 17: along with GNU CC; see the file COPYING. If not, write to 18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 19: 20: /* Define USE_GAS if GCC is supposed to work with the GNU assembler, 21: GNU linker and GNU debugger using DBX debugging information. 22: (In other words, much of HPUX has been cast aside.) 23: Undefine USE_GAS if you want GCC to feed the HP assembler. */ 24: 25: /* #define USE_GAS */ /* Use hp320g.h if you want this. */ 26: 27: /* Control assembler-syntax conditionals in m68k.md. */ 28: 29: #ifndef USE_GAS 30: #define MOTOROLA /* Use Motorola syntax rather than "MIT" */ 31: #define SGS /* Uses SGS assembler */ 32: #define SGS_CMP_ORDER /* Takes cmp operands in reverse order */ 33: #define HPUX_ASM 34: 35: #if !defined (CROSS_COMPILE) && !defined (NO_BUGS) 36: /* The assembler on HP 9k3xx machines running HPUX 8.0 doesn't translate 37: floating point constants behind some operands. The workaround is to 38: use hex constants. Reported by Thomas Nau ([email protected]). */ 39: #define AS_BUG_FLOATING_CONSTANT 40: /* The assembler on HP 9k3xx machines running HPUX 8.0 doesn't accept 41: labels followed by a text, data, or other section directive. Reported 42: by Thomas Nau ([email protected]). */ 43: #define AS_BUG_TRAILING_LABEL 44: #endif 45: 1.1.1.2 root 46: #endif /* not USE_GAS */ 47: 1.1 root 48: /* gcc.c should find libgcc.a itself rather than expecting linker to. */ 49: #define LINK_LIBGCC_SPECIAL 50: /* The arguments of -L must be a separate argv element. */ 51: #define SPACE_AFTER_L_OPTION 52: /* HP/UX doesn't have libg.a. */ 53: #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" 54: 55: /* Be compatible with system stddef.h. */ 56: #define SIZE_TYPE "unsigned int" 57: 58: /* Use atexit for static constructors/destructors, instead of defining 59: our own exit function. */ 60: #define HAVE_ATEXIT 61: 62: #include "m68k/m68k.h" 63: 64: /* See m68k.h. 7 means 68020 with 68881. */ 65: 66: #ifndef TARGET_DEFAULT 67: #define TARGET_DEFAULT 7 68: #endif 69: 70: /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. 71: This will control the use of inline 68881 insns in certain macros. */ 72: 73: #ifdef HPUX_ASM 74: 75: #define ASM_SPEC "%{m68000:+X}%{mc68000:+X}" 76: 1.1.1.3 ! root 77: #define NO_DOT_IN_LABEL ! 78: 1.1 root 79: #if TARGET_DEFAULT & 02 /* -m68881 is the default */ 80: 81: /* These definitions differ from those used for GAS by defining __HPUX_ASM__. 82: This is needed because some programs, particularly GDB, need to 83: know which assembler is being used so that the correct `asm' 84: instructions can be used. */ 85: 86: #define CPP_SPEC \ 87: "%{!msoft-float:-D__HAVE_68881__ }\ 88: %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE} -D__HPUX_ASM__" 89: 90: #else /* default is -msoft-float */ 91: 92: #define CPP_SPEC \ 93: "%{m68881:-D__HAVE_68881__ }\ 94: %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE} -D__HPUX_ASM__" 95: 96: #endif /* default is -msoft-float */ 97: 98: #else /* not HPUX_ASM */ 99: 100: #if TARGET_DEFAULT & 02 /* -m68881 is the default */ 101: 102: #define CPP_SPEC \ 103: "%{!msoft-float:-D__HAVE_68881__ }\ 104: %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE}" 105: 106: #else /* default is -msoft-float */ 107: 108: #define CPP_SPEC \ 109: "%{m68881:-D__HAVE_68881__ }\ 110: %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE}" 111: 112: #endif /* default is -msoft-float */ 113: 114: 115: /* -m68000 requires special flags to the assembler. */ 116: #define ASM_SPEC \ 117: "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}" 118: 119: /* Tell GCC to put a space after -L when generating such options. */ 120: #define SPACE_AFTER_L_OPTION 121: 122: #endif /* Not HPUX_ASM */ 123: 1.1.1.3 ! root 124: /* Translate -static for HPUX linker. */ ! 125: #define LINK_SPEC "%{static:-a archive}" ! 126: 1.1 root 127: /* Names to predefine in the preprocessor for this target machine 128: (for non-strict-ANSI programs only). */ 129: /* These are the ones defined by HPUX cc, plus mc68000 for uniformity with 130: GCC on other 68000 systems. */ 131: 1.1.1.2 root 132: #define CPP_PREDEFINES "-Dhp9000s200 -Dhp9000s300 -DPWB -Dhpux -Dunix -D__hp9000s300 -D__hp9000s200 -D__PWB -D__hpux -D__unix -D__motorola__ -Asystem(unix) -Asystem(hpux) -Acpu(m68k) -Amachine(m68k)" 1.1 root 133: 134: /* Every structure or union's size must be a multiple of 2 bytes. */ 135: 136: #define STRUCTURE_SIZE_BOUNDARY 16 137: 138: /* hpux doesn't use static area for struct returns. */ 139: #undef PCC_STATIC_STRUCT_RETURN 140: 141: /* Generate calls to memcpy, memcmp and memset. */ 142: #define TARGET_MEM_FUNCTIONS 143: 144: #if 0 /* No longer correct in HPUX version 6.5. */ 145: /* Function calls don't save any fp registers on hpux. */ 146: #undef CALL_USED_REGISTERS 147: #define CALL_USED_REGISTERS \ 148: {1, 1, 0, 0, 0, 0, 0, 0, \ 149: 1, 1, 0, 0, 0, 0, 0, 1, \ 150: 1, 1, 1, 1, 1, 1, 1, 1} 151: #endif /* 0 */ 152: 153: #ifdef HPUX_ASM 154: 155: /* Override parts of m68k.h to fit the HPUX assembler. */ 156: 157: #undef TARGET_VERSION 158: #undef REGISTER_NAMES 159: #undef ASM_OUTPUT_REG_PUSH 160: #undef ASM_OUTPUT_REG_POP 161: #undef ASM_FILE_START 162: #undef ASM_APP_ON 163: #undef ASM_APP_OFF 164: #undef TEXT_SECTION_ASM_OP 165: #undef DATA_SECTION_ASM_OP 1.1.1.3 ! root 166: #undef READONLY_DATA_SECTION 1.1 root 167: #undef ASM_OUTPUT_DOUBLE 168: #undef ASM_OUTPUT_FLOAT 169: #undef ASM_OUTPUT_INT 170: #undef ASM_OUTPUT_SHORT 171: #undef ASM_OUTPUT_CHAR 172: #undef ASM_OUTPUT_BYTE 173: #undef ASM_OUTPUT_ADDR_VEC_ELT 174: #undef ASM_OUTPUT_ADDR_DIFF_ELT 175: #undef ASM_OUTPUT_ALIGN 176: #undef ASM_OUTPUT_SKIP 177: #undef ASM_OUTPUT_COMMON 178: #undef ASM_OUTPUT_LOCAL 179: #undef ASM_FORMAT_PRIVATE_NAME 180: #undef PRINT_OPERAND 181: #undef PRINT_OPERAND_ADDRESS 182: #undef FUNCTION_PROFILER 183: #undef ASM_OUTPUT_INTERNAL_LABEL 184: #undef GLOBAL_ASM_OP 1.1.1.3 ! root 185: #undef IMMEDIATE_PREFIX ! 186: #undef REGISTER_PREFIX 1.1 root 187: 188: #define TARGET_VERSION fprintf (stderr, " (68k, SGS/hpux syntax)"); 189: 190: #define REGISTER_NAMES \ 191: {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ 192: "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp", \ 193: "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"} 194: 1.1.1.3 ! root 195: #define IMMEDIATE_PREFIX "&" ! 196: #define REGISTER_PREFIX "%" 1.1 root 197: 198: #define FUNCTION_PROFILER(FILE, LABEL_NO) \ 199: fprintf (FILE, "\tmov.l &LP%d,%%a0\n\tjsr mcount\n", (LABEL_NO)); 200: 201: /* This is how to output an insn to push a register on the stack. 202: It need not be very fast code. */ 203: 204: #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ 205: fprintf (FILE, "\tmov.l %s,-(%%sp)\n", reg_names[REGNO]) 206: 207: /* This is how to output an insn to pop a register from the stack. 208: It need not be very fast code. */ 209: 210: #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ 211: fprintf (FILE, "\tmov.l (%%sp)+,%s\n", reg_names[REGNO]) 212: 213: /* For HPUX versions before 6.5, define this macro as empty. */ 214: #define ASM_FILE_START(FILE) \ 215: if (TARGET_68020) \ 216: { \ 217: if (TARGET_68881) \ 218: fprintf (FILE, "\tversion 3\n"); /* 68020 fp regs saved */ \ 219: else \ 220: fprintf (FILE, "\tversion 2\n"); /* 68020 no fp regs saved */ \ 221: } \ 222: else \ 223: fprintf (FILE, "\tversion 1\n"); /* 68010 */ 224: 225: #define ASM_APP_ON "" 226: 227: #define ASM_APP_OFF "" 228: 229: #ifdef AS_BUG_TRAILING_LABEL 230: #define TEXT_SECTION_ASM_OP "\tlalign\t1\ntext" 231: #define DATA_SECTION_ASM_OP "\tlalign\t1\ndata" 232: #else 233: #define TEXT_SECTION_ASM_OP "text" 234: #define DATA_SECTION_ASM_OP "data" 235: #endif 236: #define ASCII_DATA_ASM_OP "byte" 237: 238: /* This is the command to make the user-level label named NAME 239: defined for reference from other files. */ 240: 241: #define GLOBAL_ASM_OP "global" 242: 243: /* This says how to output an assembler line 244: to define a global common symbol. */ 245: 246: #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ 247: ( fputs ("\tcomm ", (FILE)), \ 248: assemble_name ((FILE), (NAME)), \ 249: fprintf ((FILE), ",%u\n", (ROUNDED))) 250: 251: /* This says how to output an assembler line 252: to define a local common symbol. */ 253: 254: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ 255: ( fputs ("\tlcomm ", (FILE)), \ 256: assemble_name ((FILE), (NAME)), \ 257: fprintf ((FILE), ",%u,2\n", (ROUNDED))) 258: 259: /* Store in OUTPUT a string (made with alloca) containing 260: an assembler-name for a local static variable named NAME. 261: LABELNO is an integer which is different for each call. */ 262: 263: #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ 264: ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12), \ 265: sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO))) 266: 267: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 268: do{ if (PREFIX[0] == 'L' && PREFIX[1] == 'I') \ 269: fprintf(FILE, "\tset %s%d,.+2\n", PREFIX, NUM); \ 270: else \ 271: fprintf (FILE, "%s%d:\n", PREFIX, NUM); \ 272: } while(0) 273: 274: #define ASM_OUTPUT_DOUBLE(FILE, VALUE) \ 275: do { char dstr[30]; \ 276: REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr); \ 277: fprintf (FILE, "\tdouble 0f%s\n", dstr); \ 278: } while (0) 279: 280: #define ASM_OUTPUT_FLOAT(FILE, VALUE) \ 281: do { char dstr[30]; \ 282: REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \ 283: fprintf (FILE, "\tfloat 0f%s\n", dstr); \ 284: } while (0) 285: 286: #undef ASM_OUTPUT_LONG_DOUBLE 287: #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ 288: do { long l[3]; \ 289: REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l); \ 290: fprintf (FILE, "\tlong 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]); \ 291: } while (0) 292: 293: /* This is how to output an assembler line defining an `int' constant. */ 294: 295: #define ASM_OUTPUT_INT(FILE,VALUE) \ 296: ( fprintf (FILE, "\tlong "), \ 297: output_addr_const (FILE, (VALUE)), \ 298: fprintf (FILE, "\n")) 299: 300: /* Likewise for `char' and `short' constants. */ 301: 302: #define ASM_OUTPUT_SHORT(FILE,VALUE) \ 303: ( fprintf (FILE, "\tshort "), \ 304: output_addr_const (FILE, (VALUE)), \ 305: fprintf (FILE, "\n")) 306: 307: #define ASM_OUTPUT_CHAR(FILE,VALUE) \ 308: ( fprintf (FILE, "\tbyte "), \ 309: output_addr_const (FILE, (VALUE)), \ 310: fprintf (FILE, "\n")) 311: 312: /* This is how to output an assembler line for a numeric constant byte. */ 313: 314: #define ASM_OUTPUT_BYTE(FILE,VALUE) \ 315: fprintf (FILE, "\tbyte 0x%x\n", (VALUE)) 316: 317: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ 318: fprintf (FILE, "\tlong L%d\n", VALUE) 319: 320: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ 321: fprintf (FILE, "\tshort L%d-L%d\n", VALUE, REL) 322: 323: #define ASM_OUTPUT_ALIGN(FILE,LOG) \ 324: if ((LOG) == 1) \ 325: fprintf (FILE, "\tlalign 2\n"); \ 326: else if ((LOG) != 0) \ 327: abort (); 328: 329: #define ASM_OUTPUT_SKIP(FILE,SIZE) \ 330: fprintf (FILE, "\tspace %u\n", (SIZE)) 331: 332: #define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) 333: #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) 334: 335: #ifdef AS_BUG_FLOATING_CONSTANT 336: #define PRINT_OPERAND_FLOAT(CODE,FILE,VALUE,INT) \ 337: do { REAL_VALUE_TO_TARGET_SINGLE (VALUE, INT); \ 338: fprintf (FILE, "&0x%x", INT); } while (0) 339: #else 340: #define PRINT_OPERAND_FLOAT(CODE,FILE,VALUE,INT) \ 341: do { if (CODE == 'f') \ 342: { char dstr[30]; \ 343: REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr); \ 344: fprintf (FILE, "&0f%s", dstr); \ 345: } \ 346: else \ 347: { \ 348: REAL_VALUE_TO_TARGET_SINGLE (VALUE, INT); \ 349: fprintf (FILE, "&0x%x", INT); } } while (0) 350: #endif /* AS_BUG_FLOATING_CONSTANT */ 351: 352: #define PRINT_OPERAND(FILE, X, CODE) \ 353: { if (CODE == '.') fprintf (FILE, "."); \ 354: else if (CODE == '#') fprintf (FILE, "&"); \ 355: else if (CODE == '-') fprintf (FILE, "-(%%sp)"); \ 356: else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ 357: else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ 358: else if (CODE == '!') fprintf (FILE, "%%fpcr"); \ 359: else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \ 360: else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \ 361: else if (CODE == '/') \ 362: fprintf (FILE, "%%"); \ 363: else if (GET_CODE (X) == REG) \ 364: fprintf (FILE, "%s", reg_names[REGNO (X)]); \ 365: else if (GET_CODE (X) == MEM) \ 366: output_address (XEXP (X, 0)); \ 367: else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \ 368: { REAL_VALUE_TYPE r; long l; \ 369: REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ 370: PRINT_OPERAND_FLOAT (CODE, FILE, r, l); } \ 371: else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ 372: { REAL_VALUE_TYPE r; char dstr[30]; \ 373: REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ 374: REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); \ 375: fprintf (FILE, "&0f%s", dstr); } \ 376: else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \ 377: { REAL_VALUE_TYPE r; char dstr[30]; \ 378: REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ 379: REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr); \ 380: fprintf (FILE, "&0f%s", dstr); } \ 381: else { putc ('&', FILE); output_addr_const (FILE, X); }} 382: 383: #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ 384: { register rtx reg1, reg2, breg, ireg; \ 385: register rtx addr = ADDR; \ 386: rtx offset; \ 387: switch (GET_CODE (addr)) \ 388: { \ 389: case REG: \ 390: fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ 391: break; \ 392: case PRE_DEC: \ 393: fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ 394: break; \ 395: case POST_INC: \ 396: fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ 397: break; \ 398: case PLUS: \ 399: reg1 = 0; reg2 = 0; \ 400: ireg = 0; breg = 0; \ 401: offset = 0; \ 402: if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \ 403: { \ 404: offset = XEXP (addr, 0); \ 405: addr = XEXP (addr, 1); \ 406: } \ 407: else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \ 408: { \ 409: offset = XEXP (addr, 1); \ 410: addr = XEXP (addr, 0); \ 411: } \ 412: if (GET_CODE (addr) != PLUS) ; \ 413: else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \ 414: { \ 415: reg1 = XEXP (addr, 0); \ 416: addr = XEXP (addr, 1); \ 417: } \ 418: else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \ 419: { \ 420: reg1 = XEXP (addr, 1); \ 421: addr = XEXP (addr, 0); \ 422: } \ 423: else if (GET_CODE (XEXP (addr, 0)) == MULT) \ 424: { \ 425: reg1 = XEXP (addr, 0); \ 426: addr = XEXP (addr, 1); \ 427: } \ 428: else if (GET_CODE (XEXP (addr, 1)) == MULT) \ 429: { \ 430: reg1 = XEXP (addr, 1); \ 431: addr = XEXP (addr, 0); \ 432: } \ 433: else if (GET_CODE (XEXP (addr, 0)) == REG) \ 434: { \ 435: reg1 = XEXP (addr, 0); \ 436: addr = XEXP (addr, 1); \ 437: } \ 438: else if (GET_CODE (XEXP (addr, 1)) == REG) \ 439: { \ 440: reg1 = XEXP (addr, 1); \ 441: addr = XEXP (addr, 0); \ 442: } \ 443: if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT \ 444: || GET_CODE (addr) == SIGN_EXTEND) \ 445: { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \ 446: /* for OLD_INDEXING \ 447: else if (GET_CODE (addr) == PLUS) \ 448: { \ 449: if (GET_CODE (XEXP (addr, 0)) == REG) \ 450: { \ 451: reg2 = XEXP (addr, 0); \ 452: addr = XEXP (addr, 1); \ 453: } \ 454: else if (GET_CODE (XEXP (addr, 1)) == REG) \ 455: { \ 456: reg2 = XEXP (addr, 1); \ 457: addr = XEXP (addr, 0); \ 458: } \ 459: } \ 460: */ \ 461: if (offset != 0) { if (addr != 0) abort (); addr = offset; } \ 462: if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND \ 463: || GET_CODE (reg1) == MULT)) \ 464: || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) \ 465: { breg = reg2; ireg = reg1; } \ 466: else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) \ 467: { breg = reg1; ireg = reg2; } \ 468: if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF) \ 469: { int scale = 1; \ 470: if (GET_CODE (ireg) == MULT) \ 471: { scale = INTVAL (XEXP (ireg, 1)); \ 472: ireg = XEXP (ireg, 0); } \ 473: if (GET_CODE (ireg) == SIGN_EXTEND) \ 474: fprintf (FILE, "L%d-LI%d(%%pc,%s.w", \ 475: CODE_LABEL_NUMBER (XEXP (addr, 0)), \ 476: CODE_LABEL_NUMBER (XEXP (addr, 0)), \ 477: reg_names[REGNO (XEXP (ireg, 0))]); \ 478: else \ 479: fprintf (FILE, "L%d-LI%d(%%pc,%s.l", \ 480: CODE_LABEL_NUMBER (XEXP (addr, 0)), \ 481: CODE_LABEL_NUMBER (XEXP (addr, 0)), \ 482: reg_names[REGNO (ireg)]); \ 483: if (scale != 1) fprintf (FILE, "*%d", scale); \ 484: putc (')', FILE); \ 485: break; } \ 486: if (ireg != 0 || breg != 0) \ 487: { int scale = 1; \ 488: if (breg == 0) \ 489: abort (); \ 490: if (addr != 0) \ 491: output_addr_const (FILE, addr); \ 492: fprintf (FILE, "(%s", reg_names[REGNO (breg)]); \ 493: if (ireg != 0) \ 494: putc (',', FILE); \ 495: if (ireg != 0 && GET_CODE (ireg) == MULT) \ 496: { scale = INTVAL (XEXP (ireg, 1)); \ 497: ireg = XEXP (ireg, 0); } \ 498: if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ 499: fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \ 500: else if (ireg != 0) \ 501: fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \ 502: if (scale != 1) fprintf (FILE, "*%d", scale); \ 503: putc (')', FILE); \ 504: break; \ 505: } \ 506: else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF) \ 507: { fprintf (FILE, "L%d-LI%d(%%pc,%s.w)", \ 508: CODE_LABEL_NUMBER (XEXP (addr, 0)), \ 509: CODE_LABEL_NUMBER (XEXP (addr, 0)), \ 510: reg_names[REGNO (reg1)]); \ 511: break; } \ 512: default: \ 513: if (GET_CODE (addr) == CONST_INT \ 514: && INTVAL (addr) < 0x8000 \ 515: && INTVAL (addr) >= -0x8000) \ 516: fprintf (FILE, "%d.w", INTVAL (addr)); \ 517: else \ 518: output_addr_const (FILE, addr); \ 519: }} 520: 521: #define ASM_OUTPUT_ASCII(f, p, size) \ 1.1.1.3 ! root 522: do { register int i; \ 1.1 root 523: int inside; \ 524: inside = FALSE; \ 525: for (i = 0; i < (size); i++) { \ 526: if (i % 8 == 0) { \ 527: if (i != 0) { \ 528: if (inside) \ 529: putc('"', (f)); \ 530: putc('\n', (f)); \ 531: inside = FALSE; \ 532: } \ 533: fprintf((f), "\t%s ", ASCII_DATA_ASM_OP); \ 534: } \ 535: if ((p)[i] < 32 || (p)[i] == '\\' || (p)[i] == '"' || (p)[i] == 127) { \ 536: if (inside) { \ 537: putc('"', (f)); \ 538: inside = FALSE; \ 539: } \ 540: if (i % 8 != 0) \ 541: putc(',', (f)); \ 542: fprintf((f), "%d", (p)[i]); \ 543: } else { \ 544: if (!inside) { \ 545: if (i % 8 != 0) \ 546: putc(',', (f)); \ 547: putc('"', (f)); \ 548: inside = TRUE; \ 549: } \ 550: putc((p)[i], (f)); \ 551: } \ 552: } \ 553: if (inside) \ 554: putc('"', (f)); \ 555: putc('\n', (f)); \ 1.1.1.3 ! root 556: } while (0) 1.1 root 557: 558: /* Translate Motorola opcodes such as `jbeq' 559: into SGS opcodes such as `beq.w'. 560: Delete the `e' in `move...' and `fmove'. 561: Change `ftst' to `ftest'. */ 562: 563: #define ASM_OUTPUT_OPCODE(FILE, PTR) \ 564: { if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \ 565: { ++(PTR); \ 566: while (*(PTR) != ' ') \ 567: { putc (*(PTR), (FILE)); ++(PTR); } \ 568: fprintf ((FILE), ".w"); } \ 569: else if ((PTR)[0] == 'f') \ 570: { \ 571: if (!strncmp ((PTR), "fmove", 5)) \ 572: { fprintf ((FILE), "fmov"); (PTR) += 5; } \ 573: else if (!strncmp ((PTR), "ftst", 4)) \ 574: { fprintf ((FILE), "ftest"); (PTR) += 4; } \ 575: } \ 576: else if ((PTR)[0] == 'm' && (PTR)[1] == 'o' \ 577: && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ 578: { fprintf ((FILE), "mov"); (PTR) += 4; } \ 579: } 580: 581: /* Prevent output of `gcc_compiled.:'. */ 582: 583: #define ASM_IDENTIFY_GCC(FILE) 584: 585: #else /* not HPUX_ASM */ 586: 587: #undef FUNCTION_PROFILER 588: 589: /* HP-UX needs the call to mcount before the link instruction. 590: Copy the return address onto the stack before the call to fake it out. */ 591: #define FUNCTION_PROFILER(FILE, LABEL_NO) \ 1.1.1.3 ! root 592: fprintf (FILE, \ ! 593: "\tmovel a6@(4),sp@-\n\tmovl #LP%d,a0\n\tjsr mcount\n\taddqw #4,sp\n", \ ! 594: (LABEL_NO)); 1.1 root 595: 596: #endif /* not HPUX_ASM */ 1.1.1.3 ! root 597: /* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an ! 598: operand of a function call. */ ! 599: #undef LEGITIMATE_PIC_OPERAND_P ! 600: #define LEGITIMATE_PIC_OPERAND_P(X) \ ! 601: (! symbolic_operand (X, VOIDmode) \ ! 602: || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X))) ! 603: ! 604: /* hpux8 and later have C++ compatable include files, so do not ! 605: pretend they are `extern "C"'. */ ! 606: #define NO_IMPLICIT_EXTERN_C
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.