OSDN Git Service

3f09240ce3b466a96b95c626742de5639e714ebf
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / hp320.h
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, 2002, 2003
3    Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
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.
11
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.
16
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.  */
21
22 /* gcc.c should find libgcc.a itself rather than expecting linker to.  */
23 #define LINK_LIBGCC_SPECIAL
24 /* The arguments of -L must be a separate argv element.  */
25 #define SPACE_AFTER_L_OPTION
26 /* HP/UX doesn't have libg.a.  */
27 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
28
29 /* Be compatible with system stddef.h.  */
30 #define SIZE_TYPE "unsigned int"
31
32 #undef INT_OP_GROUP
33 #define INT_OP_GROUP INT_OP_NO_DOT
34
35 /* See m68k.h.  7 means 68020 with 68881.  */
36
37 #ifndef TARGET_DEFAULT
38 #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
39 #endif
40
41 /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
42    This will control the use of inline 68881 insns in certain macros.  */
43
44 #ifdef HPUX_ASM
45
46 #define ASM_SPEC "%{m68000:+X}%{mc68000:+X}"
47
48 #define NO_DOT_IN_LABEL
49
50 #if TARGET_DEFAULT & MASK_68881  /* -m68881 is the default */
51
52 /* These definitions differ from those used for GAS by defining __HPUX_ASM__.
53    This is needed because some programs, particularly GDB, need to
54    know which assembler is being used so that the correct `asm'
55    instructions can be used.  */
56
57 #define CPP_SPEC \
58 "%{!msoft-float:-D__HAVE_68881__ }\
59 %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE} -D__HPUX_ASM__"
60
61 #else /* default is -msoft-float */
62
63 #define CPP_SPEC \
64 "%{m68881:-D__HAVE_68881__ }\
65 %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE} -D__HPUX_ASM__"
66
67 #endif /* default is -msoft-float */
68
69 #else /* not HPUX_ASM */
70
71 #if TARGET_DEFAULT & MASK_68881  /* -m68881 is the default */
72
73 #define CPP_SPEC \
74 "%{!msoft-float:-D__HAVE_68881__ }\
75 %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE}"
76
77 #else /* default is -msoft-float */
78
79 #define CPP_SPEC \
80 "%{m68881:-D__HAVE_68881__ }\
81 %{!ansi:%{!mc68000:%{!m68000:-Dmc68020}} -D_HPUX_SOURCE}"
82
83 #endif /* default is -msoft-float */
84
85 /* -m68000 requires special flags to the assembler.  */
86 #define ASM_SPEC \
87  "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}"
88
89 /* Tell GCC to put a space after -L when generating such options.  */
90 #define SPACE_AFTER_L_OPTION
91
92 #endif /* Not HPUX_ASM */
93
94 /* Translate -static for HPUX linker.  */
95 #define LINK_SPEC "%{static:-a archive}"
96
97
98 /* Target OS builtins.  These are the ones defined by HPUX cc.  */
99 #define TARGET_OS_CPP_BUILTINS()                \
100   do                                            \
101     {                                           \
102         builtin_define_std ("hp9000s200");      \
103         builtin_define_std ("hp9000s300");      \
104         builtin_define_std ("hpux");            \
105         builtin_define_std ("unix");            \
106         builtin_define_std ("PWB");             \
107         builtin_define ("__motorola__");        \
108         builtin_assert ("system=unix");         \
109         builtin_assert ("system=hpux");         \
110     }                                           \
111   while (0)
112
113 /* Every structure or union's size must be a multiple of 2 bytes.  */
114
115 #define STRUCTURE_SIZE_BOUNDARY 16
116
117 /* hpux doesn't use static area for struct returns.  */
118 #undef PCC_STATIC_STRUCT_RETURN
119
120 /* Generate calls to memcpy, memcmp and memset.  */
121 #define TARGET_MEM_FUNCTIONS
122
123 #if 0  /* No longer correct in HPUX version 6.5.  */
124 /* Function calls don't save any fp registers on hpux.  */
125 #undef CALL_USED_REGISTERS
126 #define CALL_USED_REGISTERS                                             \
127  {1, 1, 0, 0, 0, 0, 0, 0,                                               \
128   1, 1, 0, 0, 0, 0, 0, 1,                                               \
129   1, 1, 1, 1, 1, 1, 1, 1}
130 #endif /* 0 */
131
132 #ifdef HPUX_ASM
133
134 /* Override parts of m68k.h to fit the HPUX assembler.  */
135
136 #undef TARGET_VERSION
137 #undef REGISTER_NAMES
138 #undef ASM_OUTPUT_REG_PUSH
139 #undef ASM_OUTPUT_REG_POP
140 #undef ASM_APP_ON
141 #undef ASM_APP_OFF
142 #undef TEXT_SECTION_ASM_OP
143 #undef DATA_SECTION_ASM_OP
144 #undef READONLY_DATA_SECTION_ASM_OP
145 #undef ASM_OUTPUT_ADDR_VEC_ELT
146 #undef ASM_OUTPUT_ADDR_DIFF_ELT
147 #undef ASM_OUTPUT_ALIGN
148 #undef ASM_OUTPUT_SKIP
149 #undef ASM_OUTPUT_COMMON
150 #undef ASM_OUTPUT_LOCAL
151 #undef FUNCTION_PROFILER
152 #undef GLOBAL_ASM_OP
153 #undef IMMEDIATE_PREFIX
154 #undef REGISTER_PREFIX
155
156 #define TARGET_VERSION fprintf (stderr, " (68k, SGS/hpux syntax)");
157
158 #define REGISTER_NAMES \
159 {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",        \
160  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",        \
161  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"}
162
163 #define IMMEDIATE_PREFIX        "&"
164 #define REGISTER_PREFIX         "%"
165
166 #define FUNCTION_PROFILER(FILE, LABEL_NO) \
167    fprintf (FILE, "\tmov.l &LP%d,%%a0\n\tjsr mcount\n", (LABEL_NO));
168
169 /* This is how to output an insn to push a register on the stack.
170    It need not be very fast code.  */
171
172 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
173   fprintf (FILE, "\tmov.l %s,-(%%sp)\n", reg_names[REGNO])
174
175 /* This is how to output an insn to pop a register from the stack.
176    It need not be very fast code.  */
177
178 #define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
179   fprintf (FILE, "\tmov.l (%%sp)+,%s\n", reg_names[REGNO])
180
181 /* For HPUX versions before 6.5, define this macro as empty.  */
182 #define TARGET_ASM_FILE_START m68k_hp320_file_start
183
184 #define ASM_APP_ON ""
185
186 #define ASM_APP_OFF ""
187
188 #ifdef AS_BUG_TRAILING_LABEL
189 #define TEXT_SECTION_ASM_OP "\tlalign\t1\ntext"
190 #define DATA_SECTION_ASM_OP "\tlalign\t1\ndata"
191 #else
192 #define TEXT_SECTION_ASM_OP "text"
193 #define DATA_SECTION_ASM_OP "data"
194 #endif
195 #define ASCII_DATA_ASM_OP "\tbyte\t"
196  
197 /* This is the command to make the user-level label named NAME
198    defined for reference from other files.  */
199
200 #define GLOBAL_ASM_OP "\tglobal\t"
201
202 /* This says how to output an assembler line
203    to define a global common symbol.  */
204
205 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
206 ( fputs ("\tcomm ", (FILE)),                    \
207   assemble_name ((FILE), (NAME)),               \
208   fprintf ((FILE), ",%u\n", (int)(ROUNDED)))
209
210 /* This says how to output an assembler line
211    to define a local common symbol.  */
212
213 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
214 ( fputs ("\tlcomm ", (FILE)),                   \
215   assemble_name ((FILE), (NAME)),               \
216   fprintf ((FILE), ",%u,2\n", (int)(ROUNDED)))
217
218 #define ASM_PN_FORMAT "%s___%lu"
219
220 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
221   fprintf (FILE, "\tlong L%d\n", VALUE)
222
223 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)  \
224   fprintf (FILE, "\tshort L%d-L%d\n", VALUE, REL)
225
226 #define ASM_OUTPUT_ALIGN(FILE,LOG)      \
227 do {                                    \
228   if ((LOG) == 1)                       \
229     fprintf (FILE, "\tlalign 2\n");     \
230   else if ((LOG) != 0)                  \
231     abort ();                           \
232 } while (0)
233
234 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
235   fprintf (FILE, "\tspace %u\n", (int)(SIZE))
236
237 #define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME)
238 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO, COUNTER)
239
240 /* Output a float value (represented as a C double) as an immediate operand.
241    This macro is a 68k-specific macro.  */
242
243 #undef ASM_OUTPUT_FLOAT_OPERAND
244 #ifdef AS_BUG_FLOATING_CONSTANT
245 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)               \
246  do { long l;                                                   \
247       REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);                   \
248       fprintf ((FILE), "&0x%lx", l);                            \
249      } while (0)
250 #else
251 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)               \
252  do {                                                           \
253       if (CODE == 'f')                                          \
254         {                                                       \
255           char dstr[30];                                        \
256           real_to_decimal (dstr, &(VALUE), sizeof (dstr), 9, 0); \
257           fprintf ((FILE), "&0f%s", dstr);                      \
258         }                                                       \
259       else                                                      \
260         {                                                       \
261           long l;                                               \
262           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);               \
263           fprintf ((FILE), "&0x%lx", l);                        \
264         }                                                       \
265      } while (0)
266 #endif /* AS_BUG_FLOATING_CONSTANT */
267
268 /* Output a double value (represented as a C double) as an immediate operand.
269    This macro is a 68k-specific macro.  */
270 #undef ASM_OUTPUT_DOUBLE_OPERAND
271 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                           \
272  do { char dstr[30];                                                    \
273       real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1);            \
274       fprintf (FILE, "&0f%s", dstr);                                    \
275     } while (0)
276
277 /* Note, long double immediate operands are not actually
278    generated by m68k.md.  */
279 #undef ASM_OUTPUT_LONG_DOUBLE_OPERAND
280 #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE)                      \
281  do { char dstr[30];                                                    \
282       real_to_decimal (dstr, &(VALUE), sizeof (dstr), 0, 1);            \
283       fprintf (FILE, "&0f%s", dstr);                                    \
284     } while (0)
285
286 #if 0
287 #undef PRINT_OPERAND
288 #define PRINT_OPERAND(FILE, X, CODE)  \
289 { if (CODE == '.') fprintf (FILE, ".");                                 \
290   else if (CODE == '#') fprintf (FILE, "&");                            \
291   else if (CODE == '-') fprintf (FILE, "-(%%sp)");                      \
292   else if (CODE == '+') fprintf (FILE, "(%%sp)+");                      \
293   else if (CODE == '@') fprintf (FILE, "(%%sp)");                       \
294   else if (CODE == '!') fprintf (FILE, "%%fpcr");                       \
295   else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \
296   else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \
297   else if (CODE == '/')                                                 \
298     fprintf (FILE, "%%");                                               \
299   else if (GET_CODE (X) == REG)                                         \
300     fprintf (FILE, "%s", reg_names[REGNO (X)]);                         \
301   else if (GET_CODE (X) == MEM)                                         \
302     output_address (XEXP (X, 0));                                       \
303   else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode)      \
304     { REAL_VALUE_TYPE r;  long l;                                       \
305       REAL_VALUE_FROM_CONST_DOUBLE (r, X);                              \
306       PRINT_OPERAND_FLOAT (CODE, FILE, r, l); }                         \
307   else if (GET_CODE (X) == CONST_DOUBLE                                 \
308            && (GET_MODE (X) == DFmode || GET_MODE (X) == XFmode))       \
309     { char dstr[30];                                                    \
310       real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X),               \
311                        sizeof (dstr), 0, 1);                            \
312       fprintf (FILE, "&0f%s", dstr); }                                  \
313   else { putc ('&', FILE); output_addr_const (FILE, X); }}
314 #endif
315
316 #undef PRINT_OPERAND_ADDRESS
317 #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
318 { register rtx reg1, reg2, breg, ireg;                                  \
319   register rtx addr = ADDR;                                             \
320   rtx offset;                                                           \
321   switch (GET_CODE (addr))                                              \
322     {                                                                   \
323     case REG:                                                           \
324       fprintf (FILE, "(%s)", reg_names[REGNO (addr)]);                  \
325       break;                                                            \
326     case PRE_DEC:                                                       \
327       fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]);       \
328       break;                                                            \
329     case POST_INC:                                                      \
330       fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]);       \
331       break;                                                            \
332     case PLUS:                                                          \
333       reg1 = 0; reg2 = 0;                                               \
334       ireg = 0; breg = 0;                                               \
335       offset = 0;                                                       \
336       if (CONSTANT_ADDRESS_P (XEXP (addr, 0)))                          \
337         {                                                               \
338           offset = XEXP (addr, 0);                                      \
339           addr = XEXP (addr, 1);                                        \
340         }                                                               \
341       else if (CONSTANT_ADDRESS_P (XEXP (addr, 1)))                     \
342         {                                                               \
343           offset = XEXP (addr, 1);                                      \
344           addr = XEXP (addr, 0);                                        \
345         }                                                               \
346       if (GET_CODE (addr) != PLUS) ;                                    \
347       else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND)                \
348         {                                                               \
349           reg1 = XEXP (addr, 0);                                        \
350           addr = XEXP (addr, 1);                                        \
351         }                                                               \
352       else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND)                \
353         {                                                               \
354           reg1 = XEXP (addr, 1);                                        \
355           addr = XEXP (addr, 0);                                        \
356         }                                                               \
357       else if (GET_CODE (XEXP (addr, 0)) == MULT)                       \
358         {                                                               \
359           reg1 = XEXP (addr, 0);                                        \
360           addr = XEXP (addr, 1);                                        \
361         }                                                               \
362       else if (GET_CODE (XEXP (addr, 1)) == MULT)                       \
363         {                                                               \
364           reg1 = XEXP (addr, 1);                                        \
365           addr = XEXP (addr, 0);                                        \
366         }                                                               \
367       else if (GET_CODE (XEXP (addr, 0)) == REG)                        \
368         {                                                               \
369           reg1 = XEXP (addr, 0);                                        \
370           addr = XEXP (addr, 1);                                        \
371         }                                                               \
372       else if (GET_CODE (XEXP (addr, 1)) == REG)                        \
373         {                                                               \
374           reg1 = XEXP (addr, 1);                                        \
375           addr = XEXP (addr, 0);                                        \
376         }                                                               \
377       if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT             \
378           || GET_CODE (addr) == SIGN_EXTEND)                            \
379         { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; }     \
380 /*  for OLD_INDEXING                                                    \
381       else if (GET_CODE (addr) == PLUS)                                 \
382         {                                                               \
383           if (GET_CODE (XEXP (addr, 0)) == REG)                         \
384             {                                                           \
385               reg2 = XEXP (addr, 0);                                    \
386               addr = XEXP (addr, 1);                                    \
387             }                                                           \
388           else if (GET_CODE (XEXP (addr, 1)) == REG)                    \
389             {                                                           \
390               reg2 = XEXP (addr, 1);                                    \
391               addr = XEXP (addr, 0);                                    \
392             }                                                           \
393         }                                                               \
394   */                                                                    \
395       if (offset != 0) { if (addr != 0) abort (); addr = offset; }      \
396       if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND                      \
397                     || GET_CODE (reg1) == MULT))                        \
398           || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2))))         \
399         { breg = reg2; ireg = reg1; }                                   \
400       else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1)))         \
401         { breg = reg1; ireg = reg2; }                                   \
402       if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF)       \
403         { int scale = 1;                                                \
404           if (GET_CODE (ireg) == MULT)                                  \
405             { scale = INTVAL (XEXP (ireg, 1));                          \
406               ireg = XEXP (ireg, 0); }                                  \
407           if (GET_CODE (ireg) == SIGN_EXTEND)                           \
408             fprintf (FILE, "L%d-LI%d(%%pc,%s.w",                        \
409                      CODE_LABEL_NUMBER (XEXP (addr, 0)),                \
410                      CODE_LABEL_NUMBER (XEXP (addr, 0)),                \
411                      reg_names[REGNO (XEXP (ireg, 0))]);                \
412           else                                                          \
413             fprintf (FILE, "L%d-LI%d(%%pc,%s.l",                        \
414                      CODE_LABEL_NUMBER (XEXP (addr, 0)),                \
415                      CODE_LABEL_NUMBER (XEXP (addr, 0)),                \
416                      reg_names[REGNO (ireg)]);                          \
417           if (scale != 1) fprintf (FILE, "*%d", scale);                 \
418           putc (')', FILE);                                             \
419           break; }                                                      \
420       if (ireg != 0 || breg != 0)                                       \
421         { int scale = 1;                                                \
422           if (breg == 0)                                                \
423             abort ();                                                   \
424           if (addr != 0)                                                \
425             output_addr_const (FILE, addr);                             \
426           fprintf (FILE, "(%s", reg_names[REGNO (breg)]);               \
427           if (ireg != 0)                                                \
428             putc (',', FILE);                                           \
429           if (ireg != 0 && GET_CODE (ireg) == MULT)                     \
430             { scale = INTVAL (XEXP (ireg, 1));                          \
431               ireg = XEXP (ireg, 0); }                                  \
432           if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND)              \
433             fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]);  \
434           else if (ireg != 0)                                           \
435             fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]);            \
436           if (scale != 1) fprintf (FILE, "*%d", scale);                 \
437           putc (')', FILE);                                             \
438           break;                                                        \
439         }                                                               \
440       else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF)               \
441         { fprintf (FILE, "L%d-LI%d(%%pc,%s.w)",                         \
442                    CODE_LABEL_NUMBER (XEXP (addr, 0)),                  \
443                    CODE_LABEL_NUMBER (XEXP (addr, 0)),                  \
444                    reg_names[REGNO (reg1)]);                            \
445           break; }                                                      \
446     default:                                                            \
447       if (GET_CODE (addr) == CONST_INT                                  \
448           && INTVAL (addr) < 0x8000                                     \
449           && INTVAL (addr) >= -0x8000)                                  \
450         fprintf (FILE, "%d.w", (int) INTVAL (addr));                    \
451       else                                                              \
452         output_addr_const (FILE, addr);                                 \
453     }}
454
455 #define ASM_OUTPUT_ASCII(f, p, SIZE)    \
456 do { size_t i, limit = (SIZE);          \
457   int inside;                           \
458   inside = FALSE;                       \
459   for (i = 0; i < limit; i++) { \
460     if (i % 8 == 0) {                   \
461       if (i != 0) {                     \
462         if (inside)                     \
463           putc('"', (f));               \
464         putc('\n', (f));                \
465         inside = FALSE;                 \
466       }                                 \
467       fprintf((f), "%s", ASCII_DATA_ASM_OP);    \
468     }                                   \
469     if ((p)[i] < 32 || (p)[i] == '\\' || (p)[i] == '"' || (p)[i] == 127) {      \
470       if (inside) {                     \
471         putc('"', (f));                 \
472         inside = FALSE;                 \
473       }                                 \
474       if (i % 8 != 0)                   \
475         putc(',', (f));                 \
476       fprintf((f), "%d", (p)[i]);       \
477     } else {                            \
478       if (!inside) {                    \
479         if (i % 8 != 0)                 \
480           putc(',', (f));               \
481         putc('"', (f));                 \
482         inside = TRUE;                  \
483       }                                 \
484       putc((p)[i], (f));                \
485     }                                   \
486   }                                     \
487   if (inside)                           \
488     putc('"', (f));                     \
489   putc('\n', (f));                      \
490 } while (0)
491
492 /* Translate Motorola opcodes such as `jbeq'
493    into SGS opcodes such as `beq.w'.
494    Delete the `e' in `move...' and `fmove'.
495    Change `ftst' to `ftest'.  */
496
497 #define ASM_OUTPUT_OPCODE(FILE, PTR)                    \
498 { if ((PTR)[0] == 'j' && (PTR)[1] == 'b')               \
499     { ++(PTR);                                          \
500       while (*(PTR) != ' ')                             \
501         { putc (*(PTR), (FILE)); ++(PTR); }             \
502       fprintf ((FILE), ".w"); }                         \
503   else if ((PTR)[0] == 'f')                             \
504     {                                                   \
505       if (!strncmp ((PTR), "fmove", 5))                 \
506         { fprintf ((FILE), "fmov"); (PTR) += 5; }       \
507       else if (!strncmp ((PTR), "ftst", 4))             \
508         { fprintf ((FILE), "ftest"); (PTR) += 4; }      \
509     }                                                   \
510   else if ((PTR)[0] == 'm' && (PTR)[1] == 'o'           \
511            && (PTR)[2] == 'v' && (PTR)[3] == 'e')       \
512     { fprintf ((FILE), "mov"); (PTR) += 4; }            \
513 }
514
515 #else /* not HPUX_ASM */
516
517 #undef FUNCTION_PROFILER
518
519 /* HP-UX needs the call to mcount before the link instruction.
520    Copy the return address onto the stack before the call to fake it out.  */
521 #define FUNCTION_PROFILER(FILE, LABEL_NO) \
522   fprintf (FILE, \
523            "\tmovel a6@(4),sp@-\n\tmovl #LP%d,a0\n\tjsr mcount\n\taddqw #4,sp\n", \
524            (LABEL_NO));
525
526 #endif /* not HPUX_ASM */
527
528 /* hpux8 and later have C++ compatible include files, so do not
529    pretend they are `extern "C"'.  */
530 #define NO_IMPLICIT_EXTERN_C