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