Annotation of gcc/config/m68k/atari.h, revision 1.1.1.1

1.1       root        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: /* Dollars and dots in labels are not allowed. */
                     24: 
                     25: #define NO_DOLLAR_IN_LABEL
                     26: #define NO_DOT_IN_LABEL
                     27: 
                     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: /* At end of a switch table, define LDnnn iff the symbol LInnn was defined.
                     37:    Some SGS assemblers have a bug such that "Lnnn-LInnn-2.b(pc,d0.l*2)"
                     38:    fails to assemble.  Luckily "Lnnn(pc,d0.l*2)" produces the results
                     39:    we want.  This difference can be accommodated by making the assembler
                     40:    define such "LDnnn" to be either "Lnnn-LInnn-2.b", "Lnnn", or any other
                     41:    string, as necessary.  This is accomplished via the ASM_OUTPUT_CASE_END
                     42:    macro. (the Amiga assembler has this bug) */
                     43: 
                     44: #undef ASM_OUTPUT_CASE_END
                     45: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE)                            \
                     46: do {                                                                   \
                     47:   if (switch_table_difference_label_flag)                              \
                     48:     asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\
                     49:   switch_table_difference_label_flag = 0;                              \
                     50: } while (0)
                     51: 
                     52: int switch_table_difference_label_flag;
                     53: 
                     54: /* This definition of ASM_OUTPUT_ASCII is the same as the one in m68k/sgs.h,
                     55:    which has been overridden by the one in svr4.h.  However, we can't use
                     56:    the one in svr4.h because the ASV assembler croaks on some of the
                     57:    strings that it emits (such as .string "\"%s\"\n"). */
                     58: 
                     59: #undef ASM_OUTPUT_ASCII
                     60: #define ASM_OUTPUT_ASCII(FILE,PTR,LEN)                         \
                     61: {                                                              \
                     62:   register int sp = 0, lp = 0, ch;                             \
                     63:   fprintf ((FILE), "\t%s ", BYTE_ASM_OP);                              \
                     64:   do {                                                         \
                     65:     ch = (PTR)[sp];                                            \
                     66:     if (ch > ' ' && ! (ch & 0x80) && ch != '\\')               \
                     67:       {                                                                \
                     68:        fprintf ((FILE), "'%c", ch);                            \
                     69:       }                                                                \
                     70:     else                                                       \
                     71:       {                                                                \
                     72:        fprintf ((FILE), "0x%x", ch);                           \
                     73:       }                                                                \
                     74:     if (++sp < (LEN))                                          \
                     75:       {                                                                \
                     76:        if ((sp % 10) == 0)                                     \
                     77:          {                                                     \
                     78:            fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP);           \
                     79:          }                                                     \
                     80:        else                                                    \
                     81:          {                                                     \
                     82:            putc (',', (FILE));                                 \
                     83:          }                                                     \
                     84:       }                                                                \
                     85:   } while (sp < (LEN));                                                \
                     86:   putc ('\n', (FILE));                                         \
                     87: }
                     88: 
                     89: /* Override these for the sake of an assembler bug: the ASV
                     90:    assembler can't handle .LC0@GOT syntax.  This pollutes the final
                     91:    table for shared librarys but what's a poor soul to do; sigh... RFH */
                     92: 
                     93: #undef ASM_GENERATE_INTERNAL_LABEL
                     94: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
                     95:   if (flag_pic && !strcmp(PREFIX,"LC"))                        \
                     96:     sprintf (LABEL, "*%s%%%d", PREFIX, NUM);           \
                     97:   else                                                 \
                     98:     sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)
                     99: 
                    100: #undef ASM_OUTPUT_INTERNAL_LABEL
                    101: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)     \
                    102:   if (flag_pic && !strcmp(PREFIX,"LC"))                        \
                    103:     asm_fprintf (FILE, "%s%%%d:\n", PREFIX, NUM);      \
                    104:   else                                                 \
                    105:     asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
                    106: 
                    107: /* Define how to generate (in the callee) the output value of a function
                    108:    and how to find (in the caller) the value returned by a function.  VALTYPE
                    109:    is the data type of the value (as a tree).  If the precise function being
                    110:    called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0.
                    111:    For the Atari generate the result in d0 or fp0 as appropriate. */
                    112: 
                    113: #undef FUNCTION_VALUE
                    114: #define FUNCTION_VALUE(VALTYPE, FUNC)                  \
                    115: (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881      \
                    116:  ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16)              \
                    117:  : gen_rtx (REG, TYPE_MODE (VALTYPE), 0))
                    118: 

unix.superglobalmegacorp.com

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