xref: /minix3/external/gpl3/gcc/files/i386-minix.h (revision b5e2faaaaf60a8b9a02f8d72f64caa56a87eb312)
1 /* Definitions for Intel 386 running MINIX with ELF format
2    Copyright (C) 1996, 2000, 2002, 2004 Free Software Foundation, Inc.
3    Contributed by Eric Youngdale.
4    Modified for stabs-in-ELF by H.J. Lu.
5    Adapted from GNU/Linux version by John Polstra.
6    Continued development by David O'Brien <obrien@freebsd.org>
7    Adapted for MINIX by Lionel Sambuc <lionel@minix3.org>
8 
9    This file is part of GCC.
10 
11    GCC is free software; you can redistribute it and/or modify it
12    under the terms of the GNU General Public License as published
13    by the Free Software Foundation; either version 2, or (at your
14    option) any later version.
15 
16    GCC is distributed in the hope that it will be useful, but WITHOUT
17    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
19    License for more details.
20 
21    You should have received a copy of the GNU General Public License
22    along with GCC; see the file COPYING.  If not, write to the
23    Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
24    MA 02110-1301, USA.  */
25 
26 #undef  MINIX_TARGET_CPU_CPP_BUILTINS
27 #define MINIX_TARGET_CPU_CPP_BUILTINS()          \
28   do                                            \
29     {                                           \
30 		builtin_define ("__i386");	\
31 		builtin_define_with_int_value ("_EM_WSIZE", 4);	\
32 		builtin_define_with_int_value ("_EM_PSIZE", 4);	\
33 		builtin_define_with_int_value ("_EM_SSIZE", 2);	\
34 		builtin_define_with_int_value ("_EM_LSIZE", 4);	\
35 		builtin_define_with_int_value ("_EM_FSIZE", 4);	\
36 		builtin_define_with_int_value ("_EM_DSIZE", 8);	\
37     }                                           \
38   while (0)
39 
40 /* Define the actual types of some ANSI-mandated types.
41    Needs to agree with <machine/ansi.h>.  GCC defaults come from c-decl.c,
42    c-common.c, and config/<arch>/<arch>.h. */
43 #undef  SIZE_TYPE
44 #define SIZE_TYPE	(TARGET_64BIT ? "long unsigned int" : "unsigned int")
45 
46 #undef  PTRDIFF_TYPE
47 #define PTRDIFF_TYPE	(TARGET_64BIT ? "long int" : "int")
48 
49 #undef  WCHAR_TYPE_SIZE
50 #define WCHAR_TYPE_SIZE	(TARGET_64BIT ? 32 : BITS_PER_WORD)
51 
52 /* Override the default comment-starter of "/".  */
53 #undef  ASM_COMMENT_START
54 #define ASM_COMMENT_START "#"
55 
56 #undef  ASM_APP_ON
57 #define ASM_APP_ON "#APP\n"
58 
59 #undef  ASM_APP_OFF
60 #define ASM_APP_OFF "#NO_APP\n"
61 
62 #undef  DBX_REGISTER_NUMBER
63 #define DBX_REGISTER_NUMBER(n) \
64   (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
65 
66 #undef  NO_PROFILE_COUNTERS
67 #define NO_PROFILE_COUNTERS	1
68 
69 /* Tell final.c that we don't need a label passed to mcount.  */
70 #undef  MCOUNT_NAME
71 #define MCOUNT_NAME ".mcount"
72 
73 /* A C statement to output to the stdio stream FILE an assembler
74    command to advance the location counter to a multiple of 1<<LOG
75    bytes if it is within MAX_SKIP bytes.
76 
77    This is used to align code labels according to Intel recommendations.  */
78 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
79 #undef  ASM_OUTPUT_MAX_SKIP_ALIGN
80 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP)					\
81   if ((LOG) != 0) {														\
82     if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG));	\
83     else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
84   }
85 #endif
86 
87 #undef SUBTARGET32_DEFAULT_CPU
88 #define SUBTARGET32_DEFAULT_CPU "i586"
89 
90 #undef TARGET_VERSION
91 #define TARGET_VERSION fprintf (stderr, " (MINIX/i586 ELF)");
92