home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / config / sparc / next.h < prev    next >
C/C++ Source or Header  |  1996-12-10  |  5KB  |  149 lines

  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. #define MACHO_PIC 1
  8.  
  9. #ifndef NEXT_SEMANTICS
  10. #define NEXT_SEMANTICS
  11. #endif
  12.  
  13. #include "sparc/sparc.h"
  14. #include "next/nextstep.h"
  15.  
  16. #define TARGET_SPARC (1)
  17.  
  18. #undef CPP_PREDEFINES
  19. #define CPP_PREDEFINES "-Dsparc -DNATURAL_ALIGNMENT -DNeXT -Dunix -D__MACH__ -D__BIG_ENDIAN__ -D__ARCHITECTURE__=\"sparc\""
  20.  
  21. #define TARGET_ARCHITECTURE \
  22.   { {"sparc", 0}}
  23.  
  24. #define DEFAULT_TARGET_ARCH "sparc"
  25.  
  26. /* putout data directives in 68k format */
  27.  
  28. #undef ASM_LONG
  29. #define ASM_LONG ".long"
  30. #undef ASM_SHORT
  31. #define ASM_SHORT ".short"
  32. #undef ASM_BYTE_OP
  33. #define ASM_BYTE_OP ".byte"
  34.  
  35. /* We don't want .proc generated */
  36.  
  37. #undef    ASM_DECLARE_RESULT
  38. #define    ASM_DECLARE_RESULT(FILE, RESULT)
  39.  
  40. #undef ASM_OUTPUT_COMMON
  41. #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
  42. ( fputs ("\n\t.comm ", (FILE)),        \
  43.   assemble_name ((FILE), (NAME)),        \
  44.   fprintf ((FILE), ",%u\n", (ROUNDED)))
  45.  
  46. /* don't use .reserve */
  47. #undef ASM_OUTPUT_LOCAL
  48. #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
  49. ( fputs (".lcomm ", (FILE)),            \
  50.   assemble_name ((FILE), (NAME)),        \
  51.   fprintf ((FILE), ",%u\n", (ROUNDED)))
  52.  
  53. /* don't use .skip */
  54. #undef ASM_OUTPUT_SKIP
  55. #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
  56.   fprintf (FILE, "\t.space %u\n", (SIZE))
  57.  
  58. /* assembler preprocessor directives */
  59. #undef ASM_APP_ON
  60. #define ASM_APP_ON "#APP\n"
  61.  
  62. #undef ASM_APP_OFF
  63. #define ASM_APP_OFF "#NO_APP\n"
  64.  
  65. #undef ASM_OUTPUT_DOUBLE
  66. #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  67.   {                                    \
  68.     long t[2];                                                          \
  69.     REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t);                \
  70.     fprintf (FILE, "!\t.double %.12e\n\t%s\t0x%lx\n\t%s\t0x%lx\n",    \
  71.          (VALUE), ASM_LONG, t[0], ASM_LONG, t[1]);            \
  72.   }
  73.  
  74. #undef ASM_OUTPUT_FLOAT
  75. #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  76.   {                                    \
  77.     long t;                                \
  78.     REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t);                \
  79.     fprintf (FILE, "!\t.single %.12e\n\t%s\t0x%lx\n", (VALUE), ASM_LONG, t);\
  80.   }
  81.  
  82. #undef ASM_OUTPUT_SOURCE_LINE
  83. #define ASM_OUTPUT_SOURCE_LINE(file, line)        \
  84.   { static int sym_lineno = 1;                \
  85.     fprintf (file, "\t.stabn 68,0,%d,LM%d\nLM%d:\n",    \
  86.          line, sym_lineno, sym_lineno);        \
  87.     sym_lineno += 1; }
  88.  
  89. #undef ASM_OUTPUT_INT
  90. #define ASM_OUTPUT_INT(FILE,VALUE)              \
  91. ( fprintf (FILE, "\t%s ", ASM_LONG),        \
  92.   output_addr_const (FILE, (VALUE)),        \
  93.   fprintf (FILE, "\n"))
  94.  
  95. #undef ASM_OUTPUT_SHORT
  96. #define ASM_OUTPUT_SHORT(FILE,VALUE)            \
  97. ( fprintf (FILE, "\t%s ", ASM_SHORT),        \
  98.   output_addr_const (FILE, (VALUE)),        \
  99.   fprintf (FILE, "\n"))
  100.  
  101. #undef ASM_OUTPUT_CHAR
  102. #define ASM_OUTPUT_CHAR(FILE,VALUE)             \
  103. ( fprintf (FILE, "\t%s ", ASM_BYTE_OP),      \
  104.   output_addr_const (FILE, (VALUE)),        \
  105.   fprintf (FILE, "\n"))
  106.  
  107. #undef ASM_OUTPUT_BYTE
  108. #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
  109.   fprintf (FILE, "\t%s 0x%x\n", ASM_BYTE_OP, (VALUE))
  110.  
  111. #undef ASM_OUTPUT_ADDR_VEC_ELT
  112. #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
  113. do {                                    \
  114.   char label[30];                            \
  115.   ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE);            \
  116.   fprintf (FILE, "\t%s ", ASM_LONG);                    \
  117.   assemble_name (FILE, label);                        \
  118.   fprintf (FILE, "\n");                            \
  119. } while (0)
  120.  
  121. #undef ASM_OUTPUT_ADDR_DIFF_ELT
  122. #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)            \
  123. do {                                    \
  124.   char label[30];                            \
  125.   ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE);            \
  126.   fprintf (FILE, "\t%s ", ASM_LONG);                    \
  127.   assemble_name (FILE, label);                        \
  128.   fprintf (FILE, "-1b\n");                        \
  129. } while (0)
  130.  
  131.  
  132. #undef SUBTARGET_OVERRIDE_OPTIONS
  133. #if 0 /* This macro is no longer needed!  */
  134. #define SUBTARGET_OVERRIDE_OPTIONS                                       \
  135. {                                                                        \
  136.    if (flag_pic) {                                                       \
  137.       if (1 || getenv("SPARC_DYNAMIC")) {                                \
  138.          warning ("-dynamic trial for sparc target architecture");       \
  139.       }                                                                  \
  140.       else {                                                             \
  141.          flag_pic = 0;                                                   \
  142.          warning ("-dynamic unsupported for sparc target architecture"); \
  143.        }                                                                 \
  144.     }                                                                    \
  145.  }
  146. #else
  147. #define SUBTARGET_OVERRIDE_OPTIONS
  148. #endif
  149.