Annotation of gcc/config/amix.h, revision 1.1.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 "m68kv4.h"
                     23: 
                     24: /* Names to predefine in the preprocessor for this target machine.  For the
                     25:    Amiga, these definitions match those of the native AT&T compiler.  Note
                     26:    that we override the definition in m68kv4.h, where SVR4 is defined and
                     27:    AMIX isn't. */
                     28: 
                     29: #undef CPP_PREDEFINES
                     30: #define CPP_PREDEFINES \
                     31:   "-Dm68k -Dunix -DAMIX -Amachine(m68k) -Acpu(m68k) -Asystem(unix) -Alint(off)"
                     32: 
                     33: /* This is the library routine that is used to transfer control from
                     34:    the trampoline to the actual nested function.  FIXME:  This needs to
                     35:    be implemented still.  -fnf */
                     36: 
                     37: #undef TRANSFER_FROM_TRAMPOLINE
                     38: 
                     39: /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
                     40:    Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
                     41:    fails to assemble.  Luckily "Lnnn(pc,d0.l*2)" produces the results
                     42:    we want.  This difference can be accommodated by using an assembler
                     43:    define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
                     44:    string, as necessary.  This is accomplished via the ASM_OUTPUT_CASE_END
                     45:    macro. (the Amiga assembler has this bug) */
                     46: 
                     47: #undef ASM_OUTPUT_CASE_END
                     48: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE)                            \
                     49: do {                                                                   \
                     50:   if (RTX_INTEGRATED_P (TABLE))                                                \
                     51:     asm_fprintf ((FILE), "%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
                     52: } while (0)
                     53: 
                     54: /* This says how to output assembler code to declare an
                     55:    uninitialized external linkage data object.  Under SVR4,
                     56:    the linker seems to want the alignment of data objects
                     57:    to depend on their types.  We do exactly that here.
                     58:    [This macro overrides the one in svr4.h because the amix assembler
                     59:     has a minimum default alignment of 4, and will not accept any
                     60:     explicit alignment smaller than this.  -fnf] */
                     61: 
                     62: #undef ASM_OUTPUT_ALIGNED_COMMON
                     63: #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)             \
                     64: do {                                                                   \
                     65:   fputs ("\t.comm\t", (FILE));                                         \
                     66:   assemble_name ((FILE), (NAME));                                      \
                     67:   fprintf ((FILE), ",%u,%u\n", (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
                     68: } while (0)
                     69: 
                     70: /* This says how to output assembler code to declare an
                     71:    uninitialized internal linkage data object.  Under SVR4,
                     72:    the linker seems to want the alignment of data objects
                     73:    to depend on their types.  We do exactly that here.
                     74:    [This macro overrides the one in svr4.h because the amix assembler
                     75:     has a minimum default alignment of 4, and will not accept any
                     76:     explicit alignment smaller than this.  -fnf] */
                     77: 
                     78: #undef ASM_OUTPUT_ALIGNED_LOCAL
                     79: #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)              \
                     80: do {                                                                   \
                     81:   fprintf ((FILE), "%s\t%s,%u,%u\n",                                   \
                     82:           BSS_ASM_OP, (NAME), (SIZE), MAX ((ALIGN) / BITS_PER_UNIT, 4)); \
                     83: } while (0)
                     84: 
                     85: /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68ksgs.h,
                     86:    which has been overridden by the one in svr4.h.  However, we can't use
                     87:    the one in svr4.h because the amix assembler croaks on some of the
                     88:    strings that it emits (such as .string "\"%s\"\n"). */
                     89: 
                     90: #undef ASM_OUTPUT_ASCII
                     91: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                         \
                     92: {                                                              \
                     93:   register int sp = 0, lp = 0, ch;                             \
                     94:   fprintf ((FILE), "%s ", BYTE_ASM_OP);                                \
                     95:   do {                                                         \
                     96:     ch = (PTR)[sp];                                            \
                     97:     if (ch > ' ' && ! (ch & 0x80) && ch != '\\')               \
                     98:       {                                                                \
                     99:        fprintf ((FILE), "'%c", ch);                            \
                    100:       }                                                                \
                    101:     else                                                       \
                    102:       {                                                                \
                    103:        fprintf ((FILE), "0x%x", ch);                           \
                    104:       }                                                                \
                    105:     if (++sp < (LEN))                                          \
                    106:       {                                                                \
                    107:        if ((sp % 10) == 0)                                     \
                    108:          {                                                     \
                    109:            fprintf ((FILE), "\n%s ", BYTE_ASM_OP);             \
                    110:          }                                                     \
                    111:        else                                                    \
                    112:          {                                                     \
                    113:            putc (',', (FILE));                                 \
                    114:          }                                                     \
                    115:       }                                                                \
                    116:   } while (sp < (LEN));                                                \
                    117:   putc ('\n', (FILE));                                         \
                    118: }

unix.superglobalmegacorp.com

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