home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / gcc-2.6.0-src.lha / GNU / src / amiga / gcc-2.6.0 / config / m68k / atari.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-28  |  3.6 KB  |  101 lines

  1. /* Definitions of target machine for GNU compiler.
  2.    Atari TT ASV version.
  3.    Copyright (C) 1994 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 1, 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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. #include "m68k/m68kv4.h"
  22.  
  23. /* Alter assembler syntax for fsgldiv and fsglmul.
  24.    It is highly likely that this is a generic SGS m68k assembler dependency.
  25.    If so, it should eventually be handled in the m68k/sgs.h ASM_OUTPUT_OPCODE
  26.    macro, like the other SGS assembler quirks.  -fnf */
  27.  
  28. #define FSGLDIV_USE_S        /* Use fsgldiv.s, not fsgldiv.x */
  29. #define FSGLMUL_USE_S        /* Use fsglmul.s, not fsglmul.x */
  30.  
  31. /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
  32.    Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
  33.    fails to assemble.  Luckily "Lnnn(pc,d0.l*2)" produces the results
  34.    we want.  This difference can be accommodated by making the assembler
  35.    define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
  36.    string, as necessary.  This is accomplished via the ASM_OUTPUT_CASE_END
  37.    macro. (the Amiga assembler has this bug) */
  38.  
  39. #undef ASM_OUTPUT_CASE_END
  40. #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE)                \
  41. do {                                    \
  42.   if (switch_table_difference_label_flag)                \
  43.     asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
  44.   switch_table_difference_label_flag = 0;                \
  45. } while (0)
  46.  
  47. int switch_table_difference_label_flag;
  48.  
  49. /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68k/sgs.h,
  50.    which has been overridden by the one in svr4.h.  However, we can't use
  51.    the one in svr4.h because the ASV assembler croaks on some of the
  52.    strings that it emits (such as .string "\"%s\"\n"). */
  53.  
  54. #undef ASM_OUTPUT_ASCII
  55. #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                \
  56. {                                \
  57.   register int sp = 0, lp = 0, ch;                \
  58.   fprintf ((FILE), "\t%s ", BYTE_ASM_OP);                \
  59.   do {                                \
  60.     ch = (PTR)[sp];                        \
  61.     if (ch > ' ' && ! (ch & 0x80) && ch != '\\')        \
  62.       {                                \
  63.     fprintf ((FILE), "'%c", ch);                \
  64.       }                                \
  65.     else                            \
  66.       {                                \
  67.     fprintf ((FILE), "0x%x", ch);                \
  68.       }                                \
  69.     if (++sp < (LEN))                        \
  70.       {                                \
  71.     if ((sp % 10) == 0)                    \
  72.       {                            \
  73.         fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP);        \
  74.       }                            \
  75.     else                            \
  76.       {                            \
  77.         putc (',', (FILE));                    \
  78.       }                            \
  79.       }                                \
  80.   } while (sp < (LEN));                        \
  81.   putc ('\n', (FILE));                        \
  82. }
  83.  
  84. /* Override these for the sake of an assembler bug: the ASV
  85.    assembler can't handle .LC0@GOT syntax.  This pollutes the final
  86.    table for shared librarys but what's a poor soul to do; sigh... RFH */
  87.  
  88. #undef ASM_GENERATE_INTERNAL_LABEL
  89. #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)    \
  90.   if (flag_pic && !strcmp(PREFIX,"LC"))            \
  91.     sprintf (LABEL, "*%s%%%d", PREFIX, NUM);        \
  92.   else                            \
  93.     sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
  94.  
  95. #undef ASM_OUTPUT_INTERNAL_LABEL
  96. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)    \
  97.   if (flag_pic && !strcmp(PREFIX,"LC"))            \
  98.     asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM);    \
  99.   else                            \
  100.     asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
  101.