]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/config/i386/lynx.h
config.gcc (case i[34567]86-*-lynxos*): Update to LynxOS 4.0.
[gcc.git] / gcc / config / i386 / lynx.h
index a926d14067c4c012400e649d6c8b610865b0b1b6..1aad4d6b1210eba9b5bcedc65cb798b53362269a 100644 (file)
@@ -1,5 +1,6 @@
-/* Definitions for Intel 386 running LynxOS.
-   Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc.
+/* Definitions for LynxOS on i386.
+   Copyright (C) 1993, 1995, 1996, 2002, 2004
+   Free Software Foundation, Inc. 
 
 This file is part of GCC.
 
@@ -18,54 +19,79 @@ along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#define TARGET_VERSION fprintf (stderr, " (80386, LYNX BSD syntax)"); 
+#define TARGET_VERSION fputs (" (i386/LynxOS)", stderr);
 
 #define TARGET_OS_CPP_BUILTINS()               \
   do                                           \
     {                                          \
-       builtin_define_std ("I386");            \
-       builtin_define_std ("Lynx");            \
-       builtin_define_std ("IBITS32");         \
-       builtin_assert ("system=unix");         \
-       builtin_assert ("system=lynx");         \
+      builtin_define ("__LITTLE_ENDIAN__");    \
+      builtin_define ("__x86__");              \
     }                                          \
   while (0)
 
-/* The prefix to add to user-visible assembler symbols.  */
+/* The svr4 ABI for the i386 says that records and unions are returned
+   in memory.  */
 
-/* Override the svr3 convention of adding a leading underscore.  */
+#define DEFAULT_PCC_STRUCT_RETURN 1
 
-#undef USER_LABEL_PREFIX
-#define USER_LABEL_PREFIX ""
+/* BSS_SECTION_ASM_OP gets defined i386/unix.h.  */
 
-/* Apparently LynxOS clobbers ebx when you call into the OS.  */
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
+  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
 
-#undef CALL_USED_REGISTERS
-#define CALL_USED_REGISTERS \
-/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \
-{  1, 1, 1, 1, 0, 0, 0, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1 }
+/* LynxOS's GDB counts the floating point registers from 16.  */
 
-/* Prefix for internally generated assembler labels.  If we aren't using
-   underscores, we are using prefix `.'s to identify labels that should
-   be ignored, as in `i386/gas.h' --karl@cs.umb.edu  */
+#undef DBX_REGISTER_NUMBER
+#define DBX_REGISTER_NUMBER(n)                                         \
+  (TARGET_64BIT ? dbx64_register_map[n]                                        \
+   : (n) == 0 ? 0                                                      \
+   : (n) == 1 ? 2                                                      \
+   : (n) == 2 ? 1                                                      \
+   : (n) == 3 ? 3                                                      \
+   : (n) == 4 ? 6                                                      \
+   : (n) == 5 ? 7                                                      \
+   : (n) == 6 ? 5                                                      \
+   : (n) == 7 ? 4                                                      \
+   : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n) + 8       \
+   : (-1))
+  
+/* A C statement to output to the stdio stream FILE an assembler
+   command to advance the location counter to a multiple of 1<<LOG
+   bytes if it is within MAX_SKIP bytes.
 
-#undef  LPREFIX
-#define LPREFIX ".L"
+   This is used to align code labels according to Intel recommendations.  */
 
-/* The prefix to add to user-visible assembler symbols.  */
+#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
+#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)                   \
+  do {                                                                 \
+    if ((LOG) != 0) {                                                  \
+      if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
+      else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
+    }                                                                  \
+  } while (0)
+#endif
 
-#undef  USER_LABEL_PREFIX
-#define USER_LABEL_PREFIX ""
+/* Since i386.h defines an empty SUBTARGET_SWITCHES the definition in
+   config/lynx.h is omitted.  */
 
-/* If user-symbols don't have underscores,
-   then it must take more than `L' to identify
-   a label that should be ignored.  */
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES SUBTARGET_OS_LYNX_SWITCHES
 
-/* This is how to store into the string BUF
-   the symbol_ref name of an internal numbered label where
-   PREFIX is the class of label and NUM is the number within the class.
-   This is suitable for output with `assemble_name'.  */
+/* Undefine SUBTARGET_EXTRA_SPECS it is empty anyway.  We define it in
+   config/lynx.h.  */
 
-#undef  ASM_GENERATE_INTERNAL_LABEL
-#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \
-  sprintf ((BUF), ".%s%ld", (PREFIX), (long)(NUMBER))
+#undef SUBTARGET_EXTRA_SPECS
+
+/* Undefine the definition from att.h to enable our default.  */
+
+#undef ASM_OUTPUT_ALIGN
+
+/* Undefine the definition from elfos.h to enable our default.  */
+
+#undef PREFERRED_DEBUGGING_TYPE
+
+/* The file i386.c defines TARGET_HAVE_TLS unconditionally if
+   HAVE_AS_TLS is defined.  HAVE_AS_TLS is defined as gas support for
+   TLS is detected by configure.  We undefine it here.  */
+
+#undef HAVE_AS_TLS
This page took 0.033079 seconds and 5 git commands to generate.