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

1.1     ! root        1: /* Definitions of target machine for GNU compiler.
        !             2:    Commodore Amiga A3000UX version.
        !             3: 
        !             4:    Copyright (C) 1991 Free Software Foundation, Inc.
        !             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
        !            20: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
        !            21: 
        !            22: #include "m68k/m68kv4.h"
        !            23: 
        !            24: /* Alter assembler syntax for fsgldiv and fsglmul.
        !            25:    It is highly likely that this is a generic SGS m68k assembler dependency.
        !            26:    If so, it should eventually be handled in the m68k/sgs.h ASM_OUTPUT_OPCODE
        !            27:    macro, like the other SGS assembler quirks.  -fnf */
        !            28: 
        !            29: #define FSGLDIV_USE_S          /* Use fsgldiv.s, not fsgldiv.x */
        !            30: #define FSGLMUL_USE_S          /* Use fsglmul.s, not fsglmul.x */
        !            31: 
        !            32: /* Names to predefine in the preprocessor for this target machine.  For the
        !            33:    Amiga, these definitions match those of the native AT&T compiler.  Note
        !            34:    that we override the definition in m68kv4.h, where SVR4 is defined and
        !            35:    AMIX isn't. */
        !            36: 
        !            37: #undef CPP_PREDEFINES
        !            38: #define CPP_PREDEFINES \
        !            39:   "-Dm68k -Dunix -DAMIX -D__svr4__ -Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)"
        !            40: 
        !            41: /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
        !            42:    Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
        !            43:    fails to assemble.  Luckily "Lnnn(pc,d0.l*2)" produces the results
        !            44:    we want.  This difference can be accommodated by making the assembler
        !            45:    define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
        !            46:    string, as necessary.  This is accomplished via the ASM_OUTPUT_CASE_END
        !            47:    macro. (the Amiga assembler has this bug) */
        !            48: 
        !            49: #undef ASM_OUTPUT_CASE_END
        !            50: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE)                            \
        !            51: do {                                                                   \
        !            52:   if (switch_table_difference_label_flag)                              \
        !            53:     asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
        !            54:   switch_table_difference_label_flag = 0;                              \
        !            55: } while (0)
        !            56: 
        !            57: int switch_table_difference_label_flag;
        !            58: 
        !            59: /* This says how to output assembler code to declare an
        !            60:    uninitialized external linkage data object.  Under SVR4,
        !            61:    the linker seems to want the alignment of data objects
        !            62:    to depend on their types.  We do exactly that here.
        !            63:    [This macro overrides the one in svr4.h because the amix assembler
        !            64:     has a minimum default alignment of 4, and will not accept any
        !            65:     explicit alignment smaller than this.  -fnf] */
        !            66: 
        !            67: #undef ASM_OUTPUT_ALIGNED_COMMON
        !            68: #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)             \
        !            69: do {                                                                   \
        !            70:   fputs ("\t.comm\t", (FILE));                                         \
        !            71:   assemble_name ((FILE), (NAME));                                      \
        !            72:   fprintf ((FILE), ",%u,%u\n", (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
        !            73: } while (0)
        !            74: 
        !            75: /* This says how to output assembler code to declare an
        !            76:    uninitialized internal linkage data object.  Under SVR4,
        !            77:    the linker seems to want the alignment of data objects
        !            78:    to depend on their types.  We do exactly that here.
        !            79:    [This macro overrides the one in svr4.h because the amix assembler
        !            80:     has a minimum default alignment of 4, and will not accept any
        !            81:     explicit alignment smaller than this.  -fnf] */
        !            82: 
        !            83: #undef ASM_OUTPUT_ALIGNED_LOCAL
        !            84: #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)              \
        !            85: do {                                                                   \
        !            86:   fprintf ((FILE), "\t%s\t%s,%u,%u\n",                                 \
        !            87:           BSS_ASM_OP, (NAME), (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
        !            88: } while (0)
        !            89: 
        !            90: /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68k/sgs.h,
        !            91:    which has been overridden by the one in svr4.h.  However, we can't use
        !            92:    the one in svr4.h because the amix assembler croaks on some of the
        !            93:    strings that it emits (such as .string "\"%s\"\n"). */
        !            94: 
        !            95: #undef ASM_OUTPUT_ASCII
        !            96: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                         \
        !            97: {                                                              \
        !            98:   register int sp = 0, lp = 0, ch;                             \
        !            99:   fprintf ((FILE), "\t%s ", BYTE_ASM_OP);                              \
        !           100:   do {                                                         \
        !           101:     ch = (PTR)[sp];                                            \
        !           102:     if (ch > ' ' && ! (ch & 0x80) && ch != '\\')               \
        !           103:       {                                                                \
        !           104:        fprintf ((FILE), "'%c", ch);                            \
        !           105:       }                                                                \
        !           106:     else                                                       \
        !           107:       {                                                                \
        !           108:        fprintf ((FILE), "0x%x", ch);                           \
        !           109:       }                                                                \
        !           110:     if (++sp < (LEN))                                          \
        !           111:       {                                                                \
        !           112:        if ((sp % 10) == 0)                                     \
        !           113:          {                                                     \
        !           114:            fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP);           \
        !           115:          }                                                     \
        !           116:        else                                                    \
        !           117:          {                                                     \
        !           118:            putc (',', (FILE));                                 \
        !           119:          }                                                     \
        !           120:       }                                                                \
        !           121:   } while (sp < (LEN));                                                \
        !           122:   putc ('\n', (FILE));                                         \
        !           123: }
        !           124: 
        !           125: /* Override these for the sake of an assembler bug: the Amix
        !           126:    assembler can't handle .LC0@GOT syntax.  This pollutes the final
        !           127:    table for shared librarys but what's a poor soul to do; sigh... RFH */
        !           128: 
        !           129: #undef ASM_GENERATE_INTERNAL_LABEL
        !           130: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
        !           131:   if (flag_pic && !strcmp(PREFIX,"LC"))                        \
        !           132:     sprintf (LABEL, "*%s%%%d", PREFIX, NUM);           \
        !           133:   else                                                 \
        !           134:     sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
        !           135: 
        !           136: #undef ASM_OUTPUT_INTERNAL_LABEL
        !           137: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)     \
        !           138:   if (flag_pic && !strcmp(PREFIX,"LC"))                        \
        !           139:     asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM);      \
        !           140:   else                                                 \
        !           141:     asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
        !           142: 

unix.superglobalmegacorp.com

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