* x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
[official-gcc.git] / gcc / config / i386 / iamcu.h
blobdaa9995f19a7c0d518360ad62d362c3c06e35381
1 /* Definitions of target machine for Intel MCU psABI.
2 Copyright (C) 2015-2017 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
25 /* Intel MCU has no 80387. Default to Intel MCU psABI. */
26 #undef TARGET_SUBTARGET_DEFAULT
27 #define TARGET_SUBTARGET_DEFAULT MASK_IAMCU
29 /* Output at beginning of assembler file. */
30 /* The .file command should always begin the output. */
31 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
33 #undef ASM_COMMENT_START
34 #define ASM_COMMENT_START "#"
36 #undef DBX_REGISTER_NUMBER
37 #define DBX_REGISTER_NUMBER(n) \
38 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
40 #undef ASM_SPEC
41 #define ASM_SPEC "--32 -march=iamcu"
43 #undef LINK_SPEC
44 #define LINK_SPEC "-m elf_iamcu"
46 #undef ENDFILE_SPEC
47 #define ENDFILE_SPEC ""
49 #undef STARTFILE_SPEC
50 #define STARTFILE_SPEC "crt0.o%s"
52 #undef LIB_SPEC
53 #define LIB_SPEC "--start-group -lc -lgloss --end-group"
55 /* A C statement (sans semicolon) to output to the stdio stream
56 FILE the assembler definition of uninitialized global DECL named
57 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
58 Try to use asm_output_aligned_bss to implement this macro. */
60 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
61 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
63 /* A C statement to output to the stdio stream FILE an assembler
64 command to advance the location counter to a multiple of 1<<LOG
65 bytes if it is within MAX_SKIP bytes.
67 This is used to align code labels according to Intel recommendations. */
69 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
70 do { \
71 if ((LOG) != 0) { \
72 if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
73 else { \
74 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
75 /* Make sure that we have at least 8 byte alignment if > 8 byte \
76 alignment is preferred. */ \
77 if ((LOG) > 3 \
78 && (1 << (LOG)) > ((MAX_SKIP) + 1) \
79 && (MAX_SKIP) >= 7) \
80 fputs ("\t.p2align 3\n", (FILE)); \
81 } \
82 } \
83 } while (0)
85 /* Handle special EH pointer encodings. Absolute, pc-relative, and
86 indirect are handled automatically. */
87 #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
88 do { \
89 if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
90 { \
91 fputs (ASM_LONG, FILE); \
92 assemble_name (FILE, XSTR (ADDR, 0)); \
93 fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
94 goto DONE; \
95 } \
96 } while (0)
98 #undef SIZE_TYPE
99 #define SIZE_TYPE "unsigned int"
101 #undef PTRDIFF_TYPE
102 #define PTRDIFF_TYPE "int"
104 #undef WCHAR_TYPE
105 #define WCHAR_TYPE "long int"
107 #undef WCHAR_TYPE_SIZE
108 #define WCHAR_TYPE_SIZE BITS_PER_WORD
110 /* Use int, instead of long int, for int32_t and uint32_t. */
111 #undef STDINT_LONG32
112 #define STDINT_LONG32 0