Annotation of gcc/config/m68k/amix.h, revision 1.1.1.4

1.1       root        1: /* Definitions of target machine for GNU compiler.
                      2:    Commodore Amiga A3000UX version.
                      3: 
1.1.1.3   root        4:    Copyright (C) 1991, 1993 Free Software Foundation, Inc.
1.1       root        5: 
                      6: This file is part of GNU CC.
                      7: 
                      8: GNU CC is free software; you can redistribute it and/or modify
                      9: it under the terms of the GNU General Public License as published by
                     10: the Free Software Foundation; either version 1, or (at your option)
                     11: any later version.
                     12: 
                     13: GNU CC is distributed in the hope that it will be useful,
                     14: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     15: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     16: GNU General Public License for more details.
                     17: 
                     18: You should have received a copy of the GNU General Public License
                     19: along with GNU CC; see the file COPYING.  If not, write to
1.1.1.4 ! root       20: the Free Software Foundation, 59 Temple Place - Suite 330,
        !            21: Boston, MA 02111-1307, USA.  */
1.1       root       22: 
                     23: #include "m68k/m68kv4.h"
                     24: 
1.1.1.2   root       25: /* [email protected] says dots are no good either.  */
                     26: #define NO_DOT_IN_LABEL
                     27: 
1.1       root       28: /* Alter assembler syntax for fsgldiv and fsglmul.
                     29:    It is highly likely that this is a generic SGS m68k assembler dependency.
                     30:    If so, it should eventually be handled in the m68k/sgs.h ASM_OUTPUT_OPCODE
                     31:    macro, like the other SGS assembler quirks.  -fnf */
                     32: 
                     33: #define FSGLDIV_USE_S          /* Use fsgldiv.s, not fsgldiv.x */
                     34: #define FSGLMUL_USE_S          /* Use fsglmul.s, not fsglmul.x */
                     35: 
                     36: /* Names to predefine in the preprocessor for this target machine.  For the
                     37:    Amiga, these definitions match those of the native AT&T compiler.  Note
                     38:    that we override the definition in m68kv4.h, where SVR4 is defined and
                     39:    AMIX isn't. */
                     40: 
                     41: #undef CPP_PREDEFINES
                     42: #define CPP_PREDEFINES \
1.1.1.2   root       43:   "-Dm68k -Dunix -DAMIX -D__svr4__ -D__motorola__ \
                     44:  -Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)"
1.1       root       45: 
                     46: /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
                     47:    Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
                     48:    fails to assemble.  Luckily "Lnnn(pc,d0.l*2)" produces the results
                     49:    we want.  This difference can be accommodated by making the assembler
                     50:    define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
                     51:    string, as necessary.  This is accomplished via the ASM_OUTPUT_CASE_END
                     52:    macro. (the Amiga assembler has this bug) */
                     53: 
                     54: #undef ASM_OUTPUT_CASE_END
                     55: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE)                            \
                     56: do {                                                                   \
                     57:   if (switch_table_difference_label_flag)                              \
                     58:     asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
                     59:   switch_table_difference_label_flag = 0;                              \
                     60: } while (0)
                     61: 
                     62: int switch_table_difference_label_flag;
                     63: 
                     64: /* This says how to output assembler code to declare an
                     65:    uninitialized external linkage data object.  Under SVR4,
                     66:    the linker seems to want the alignment of data objects
                     67:    to depend on their types.  We do exactly that here.
                     68:    [This macro overrides the one in svr4.h because the amix assembler
                     69:     has a minimum default alignment of 4, and will not accept any
                     70:     explicit alignment smaller than this.  -fnf] */
                     71: 
                     72: #undef ASM_OUTPUT_ALIGNED_COMMON
                     73: #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)             \
                     74: do {                                                                   \
                     75:   fputs ("\t.comm\t", (FILE));                                         \
                     76:   assemble_name ((FILE), (NAME));                                      \
                     77:   fprintf ((FILE), ",%u,%u\n", (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
                     78: } while (0)
                     79: 
                     80: /* This says how to output assembler code to declare an
                     81:    uninitialized internal linkage data object.  Under SVR4,
                     82:    the linker seems to want the alignment of data objects
                     83:    to depend on their types.  We do exactly that here.
                     84:    [This macro overrides the one in svr4.h because the amix assembler
                     85:     has a minimum default alignment of 4, and will not accept any
                     86:     explicit alignment smaller than this.  -fnf] */
                     87: 
                     88: #undef ASM_OUTPUT_ALIGNED_LOCAL
                     89: #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)              \
                     90: do {                                                                   \
                     91:   fprintf ((FILE), "\t%s\t%s,%u,%u\n",                                 \
                     92:           BSS_ASM_OP, (NAME), (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
                     93: } while (0)
                     94: 
                     95: /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68k/sgs.h,
                     96:    which has been overridden by the one in svr4.h.  However, we can't use
                     97:    the one in svr4.h because the amix assembler croaks on some of the
                     98:    strings that it emits (such as .string "\"%s\"\n"). */
                     99: 
                    100: #undef ASM_OUTPUT_ASCII
                    101: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                         \
1.1.1.3   root      102: do {                                                           \
1.1       root      103:   register int sp = 0, lp = 0, ch;                             \
1.1.1.3   root      104:   fprintf ((FILE), "\t%s ", BYTE_ASM_OP);                      \
1.1       root      105:   do {                                                         \
                    106:     ch = (PTR)[sp];                                            \
                    107:     if (ch > ' ' && ! (ch & 0x80) && ch != '\\')               \
                    108:       {                                                                \
                    109:        fprintf ((FILE), "'%c", ch);                            \
                    110:       }                                                                \
                    111:     else                                                       \
                    112:       {                                                                \
                    113:        fprintf ((FILE), "0x%x", ch);                           \
                    114:       }                                                                \
                    115:     if (++sp < (LEN))                                          \
                    116:       {                                                                \
                    117:        if ((sp % 10) == 0)                                     \
                    118:          {                                                     \
                    119:            fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP);           \
                    120:          }                                                     \
                    121:        else                                                    \
                    122:          {                                                     \
                    123:            putc (',', (FILE));                                 \
                    124:          }                                                     \
                    125:       }                                                                \
                    126:   } while (sp < (LEN));                                                \
                    127:   putc ('\n', (FILE));                                         \
1.1.1.3   root      128: } while (0)
1.1       root      129: 
1.1.1.2   root      130: /* The following should be unnecessary as a result of PIC_CASE_VECTOR_ADDRESS.
                    131:    But [email protected] says they are still needed.  */
                    132: 
1.1       root      133: /* Override these for the sake of an assembler bug: the Amix
                    134:    assembler can't handle .LC0@GOT syntax.  This pollutes the final
                    135:    table for shared librarys but what's a poor soul to do; sigh... RFH */
                    136: 
                    137: #undef ASM_GENERATE_INTERNAL_LABEL
                    138: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
                    139:   if (flag_pic && !strcmp(PREFIX,"LC"))                        \
                    140:     sprintf (LABEL, "*%s%%%d", PREFIX, NUM);           \
                    141:   else                                                 \
                    142:     sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
                    143: 
                    144: #undef ASM_OUTPUT_INTERNAL_LABEL
                    145: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)     \
                    146:   if (flag_pic && !strcmp(PREFIX,"LC"))                        \
                    147:     asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM);      \
                    148:   else                                                 \
                    149:     asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.