Annotation of gcc/config/amix.h, revision 1.1.1.2

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

unix.superglobalmegacorp.com

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