OSDN Git Service

* config/i386/i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X'
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / linux.h
index 2d6fb68..ec5dc4e 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004
-   Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005,
+   2006, 2007 Free Software Foundation, Inc.
    Contributed by Eric Youngdale.
    Modified for stabs-in-ELF by H.J. Lu.
 
@@ -8,7 +8,7 @@ This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -17,9 +17,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 /* Output at beginning of assembler file.  */
 /* The .file command should always begin the output.  */
@@ -56,7 +55,7 @@ Boston, MA 02110-1301, USA.  */
    frame, so we cannot allow profiling without a frame pointer.  */
 
 #undef SUBTARGET_FRAME_POINTER_REQUIRED
-#define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile
+#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
 
 #undef SIZE_TYPE
 #define SIZE_TYPE "unsigned int"
@@ -99,13 +98,14 @@ Boston, MA 02110-1301, USA.  */
 
 /* If ELF is the default format, we should not use /lib/elf.  */
 
+/* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
 #define LINK_EMULATION "elf_i386"
-#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 
 #undef  SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
   { "link_emulation", LINK_EMULATION },\
-  { "dynamic_linker", DYNAMIC_LINKER }
+  { "dynamic_linker", LINUX_DYNAMIC_LINKER }
 
 #undef LINK_SPEC
 #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
@@ -120,6 +120,9 @@ Boston, MA 02110-1301, USA.  */
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC \
   "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+   %{mpc32:crtprec32.o%s} \
+   %{mpc64:crtprec64.o%s} \
+   %{mpc80:crtprec80.o%s} \
    %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
 /* A C statement (sans semicolon) to output to the stdio stream
@@ -141,7 +144,13 @@ Boston, MA 02110-1301, USA.  */
   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)); \
+      else {                                                           \
+       fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));     \
+       /* Make sure that we have at least 8 byte alignment if > 8 byte \
+          alignment is preferred.  */                                  \
+       if ((LOG) > 3 && (1 << (LOG)) > ((MAX_SKIP) + 1))               \
+         fprintf ((FILE), "\t.p2align 3\n");                           \
+      }                                                                        \
     }                                                                  \
   } while (0)
 #endif
@@ -171,11 +180,12 @@ Boston, MA 02110-1301, USA.  */
 #define CRT_GET_RFIB_DATA(BASE)                                                \
   __asm__ ("call\t.LPR%=\n"                                            \
           ".LPR%=:\n\t"                                                \
-          "popl\t%0\n\t"                                               \
+          "pop{l}\t%0\n\t"                                             \
           /* Due to a GAS bug, this cannot use EAX.  That encodes      \
              smaller than the traditional EBX, which results in the    \
              offset being off by one.  */                              \
-          "addl\t$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0"                 \
+          "add{l}\t{$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0"              \
+                  "|%0,_GLOBAL_OFFSET_TABLE_+(.-.LPR%=)}"              \
           : "=d"(BASE))
 #endif