Annotation of GNUtools/cc/config/sparc/next.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Target definitions for GNU compiler for sparc running NEXSTEP
        !             3:  * Any uncommented definitions are re-defines. Lookup corresponding
        !             4:  * comments in sparc.h
        !             5:  */
        !             6: 
        !             7: #include "sparc/sparc.h"
        !             8: #include "nextstep.h"
        !             9: 
        !            10: /* this macro is necessary to make objc method encodings work correctly
        !            11:    (aka compute the proper stack offset for regs) */
        !            12: 
        !            13: #define OBJC_FORWARDING_REG_OFFSET(ISREG, OFF, REGNO) \
        !            14:        do { OFF = (4 * ((REGNO) - 24)); \
        !            15:                ISREG = 0; } while (0)
        !            16: 
        !            17: #undef CPP_PREDEFINES
        !            18: #define CPP_PREDEFINES "-Dsparc -DNATURAL_ALIGNMENT -DNeXT -Dunix -D__MACH__ -D__BIG_ENDIAN__ -D__ARCHITECTURE__=\"sparc\""
        !            19: 
        !            20: #define TARGET_ARCHITECTURE \
        !            21:   { {"sparc", 0}}
        !            22: 
        !            23: #define DEFAULT_TARGET_ARCH "sparc"
        !            24: 
        !            25: /* putout data directives in 68k format */
        !            26: 
        !            27: #undef ASM_LONG
        !            28: #define ASM_LONG ".long"
        !            29: #undef ASM_SHORT
        !            30: #define ASM_SHORT ".short"
        !            31: #undef ASM_BYTE_OP
        !            32: #define ASM_BYTE_OP ".byte"
        !            33: 
        !            34: /* We don't want .proc generated */
        !            35: 
        !            36: #undef ASM_DECLARE_RESULT
        !            37: #define        ASM_DECLARE_RESULT(FILE, RESULT)
        !            38: 
        !            39: /* customizations for .globl instead of .global */
        !            40: 
        !            41: #undef ASM_GLOBALIZE_LABEL
        !            42: #define ASM_GLOBALIZE_LABEL(FILE,NAME) \
        !            43:   do {    fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); \
        !            44:           fputs ("\n", FILE);} while (0)
        !            45: 
        !            46: #undef ASM_OUTPUT_COMMON
        !            47: #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
        !            48: ( fputs ("\n\t.comm ", (FILE)),                \
        !            49:   assemble_name ((FILE), (NAME)),              \
        !            50:   fprintf ((FILE), ",%u\n", (ROUNDED)))
        !            51: 
        !            52: /* don't use .reserve */
        !            53: #undef ASM_OUTPUT_LOCAL
        !            54: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
        !            55: ( fputs (".lcomm ", (FILE)),                   \
        !            56:   assemble_name ((FILE), (NAME)),              \
        !            57:   fprintf ((FILE), ",%u\n", (ROUNDED)))
        !            58: 
        !            59: /* don't use .skip */
        !            60: #undef ASM_OUTPUT_SKIP
        !            61: #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
        !            62:   fprintf (FILE, "\t.space %u\n", (SIZE))
        !            63: 
        !            64: /* assembler preprocessor directives */
        !            65: #undef ASM_APP_ON
        !            66: #define ASM_APP_ON "#APP\n"
        !            67: 
        !            68: #undef ASM_APP_OFF
        !            69: #define ASM_APP_OFF "#NO_APP\n"
        !            70: 
        !            71: #undef ASM_OUTPUT_DOUBLE
        !            72: #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                                  \
        !            73:   {                                                                    \
        !            74:     long t[2];                                                          \
        !            75:     REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t);                          \
        !            76:     fprintf (FILE, "!\t.double %.12e\n\t%s\t0x%lx\n\t%s\t0x%lx\n",     \
        !            77:             (VALUE), ASM_LONG, t[0], ASM_LONG, t[1]);                  \
        !            78:   }
        !            79: 
        !            80: #undef ASM_OUTPUT_FLOAT
        !            81: #define ASM_OUTPUT_FLOAT(FILE,VALUE)                                   \
        !            82:   {                                                                    \
        !            83:     long t;                                                            \
        !            84:     REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t);                          \
        !            85:     fprintf (FILE, "!\t.single %.12e\n\t%s\t0x%lx\n", (VALUE), ASM_LONG, t);\
        !            86:   }
        !            87: 
        !            88: #undef ASM_OUTPUT_SOURCE_LINE
        !            89: #define ASM_OUTPUT_SOURCE_LINE(file, line)             \
        !            90:   { static int sym_lineno = 1;                         \
        !            91:     fprintf (file, "\t.stabn 68,0,%d,LM%d\nLM%d:\n",   \
        !            92:             line, sym_lineno, sym_lineno);             \
        !            93:     sym_lineno += 1; }
        !            94: 
        !            95: #undef ASM_OUTPUT_INT
        !            96: #define ASM_OUTPUT_INT(FILE,VALUE)              \
        !            97: ( fprintf (FILE, "\t%s ", ASM_LONG),           \
        !            98:   output_addr_const (FILE, (VALUE)),           \
        !            99:   fprintf (FILE, "\n"))
        !           100: 
        !           101: #undef ASM_OUTPUT_SHORT
        !           102: #define ASM_OUTPUT_SHORT(FILE,VALUE)            \
        !           103: ( fprintf (FILE, "\t%s ", ASM_SHORT),          \
        !           104:   output_addr_const (FILE, (VALUE)),           \
        !           105:   fprintf (FILE, "\n"))
        !           106: 
        !           107: #undef ASM_OUTPUT_CHAR
        !           108: #define ASM_OUTPUT_CHAR(FILE,VALUE)             \
        !           109: ( fprintf (FILE, "\t%s ", ASM_BYTE_OP),        \
        !           110:   output_addr_const (FILE, (VALUE)),           \
        !           111:   fprintf (FILE, "\n"))
        !           112: 
        !           113: #undef ASM_OUTPUT_BYTE
        !           114: #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
        !           115:   fprintf (FILE, "\t%s 0x%x\n", ASM_BYTE_OP, (VALUE))
        !           116: 
        !           117: #undef ASM_OUTPUT_ADDR_VEC_ELT
        !           118: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
        !           119: do {                                                                   \
        !           120:   char label[30];                                                      \
        !           121:   ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE);                     \
        !           122:   fprintf (FILE, "\t%s ", ASM_LONG);                                   \
        !           123:   assemble_name (FILE, label);                                         \
        !           124:   fprintf (FILE, "\n");                                                        \
        !           125: } while (0)
        !           126: 
        !           127: #undef ASM_OUTPUT_ADDR_DIFF_ELT
        !           128: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)                     \
        !           129: do {                                                                   \
        !           130:   char label[30];                                                      \
        !           131:   ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE);                     \
        !           132:   fprintf (FILE, "\t%s ", ASM_LONG);                                   \
        !           133:   assemble_name (FILE, label);                                         \
        !           134:   fprintf (FILE, "-1b\n");                                             \
        !           135: } while (0)
        !           136: 
        !           137: 
        !           138: /* Make SPARC V8 the default architecture */
        !           139: #undef TARGET_DEFAULT
        !           140: #define TARGET_DEFAULT 67      // turn on Sparc V8 flag, hard-fp and fpu

unix.superglobalmegacorp.com

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