1/* IA32 VxWorks target definitions for GNU compiler.
2   Copyright (C) 2003-2015 Free Software Foundation, Inc.
3   Updated by CodeSourcery, LLC.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3.  If not see
19<http://www.gnu.org/licenses/>.  */
20
21#undef  ASM_SPEC
22#define ASM_SPEC ""
23
24#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
25  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
26
27/* VxWorks uses the same ABI as Solaris 2, so use i386/sol2.h version.  */
28
29#undef TARGET_SUBTARGET_DEFAULT
30#define TARGET_SUBTARGET_DEFAULT \
31	(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_VECT8_RETURNS)
32
33/* Provide our target specific DBX_REGISTER_NUMBER.  VxWorks relies on
34   the SVR4 numbering.  */
35
36#undef DBX_REGISTER_NUMBER
37#define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
38
39#define TARGET_OS_CPP_BUILTINS()			\
40  do							\
41    {							\
42      VXWORKS_OS_CPP_BUILTINS ();			\
43      if (TARGET_386)					\
44        builtin_define ("CPU=I80386");			\
45      else if (TARGET_486)				\
46        builtin_define ("CPU=I80486");			\
47      else if (TARGET_PENTIUM)				\
48        {						\
49          builtin_define ("CPU=PENTIUM");		\
50          builtin_define ("CPU_VARIANT=PENTIUM");	\
51        }						\
52      else if (TARGET_PENTIUMPRO)			\
53        {						\
54          builtin_define ("CPU=PENTIUM2");		\
55          builtin_define ("CPU_VARIANT=PENTIUMPRO");	\
56        }						\
57      else if (TARGET_PENTIUM4)				\
58        {						\
59          builtin_define ("CPU=PENTIUM4");		\
60          builtin_define ("CPU_VARIANT=PENTIUM4");	\
61        }						\
62    }							\
63  while (0)
64
65#undef  CPP_SPEC
66#define CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
67#undef  LIB_SPEC
68#define LIB_SPEC VXWORKS_LIB_SPEC
69#undef  STARTFILE_SPEC
70#define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
71#undef  ENDFILE_SPEC
72#define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
73#undef  LINK_SPEC
74#define LINK_SPEC VXWORKS_LINK_SPEC
75
76#undef  SUBTARGET_SWITCHES
77#define SUBTARGET_SWITCHES EXTRA_SUBTARGET_SWITCHES
78
79#undef SUBTARGET_OVERRIDE_OPTIONS
80#define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
81
82/* No _mcount profiling on VxWorks.  */
83#undef FUNCTION_PROFILER
84#define FUNCTION_PROFILER(FILE,LABELNO) VXWORKS_FUNCTION_PROFILER(FILE,LABELNO)
85
86/* We cannot use PC-relative accesses for VxWorks PIC because there is no
87   fixed gap between segments.  */
88#undef ASM_PREFERRED_EH_DATA_FORMAT
89
90#define IX86_MAYBE_NO_LIBGCC_TFMODE
91