comparison gcc/config/nios2/nios2.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Definitions of target machine for Altera Nios II. 1 /* Definitions of target machine for Altera Nios II.
2 Copyright (C) 2012-2017 Free Software Foundation, Inc. 2 Copyright (C) 2012-2018 Free Software Foundation, Inc.
3 Contributed by Jonah Graham (jgraham@altera.com), 3 Contributed by Jonah Graham (jgraham@altera.com),
4 Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com). 4 Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com).
5 Contributed by Mentor Graphics, Inc. 5 Contributed by Mentor Graphics, Inc.
6 6
7 This file is part of GCC. 7 This file is part of GCC.
219 #define REGNO_REG_CLASS(REGNO) (GP_REG_P (REGNO) ? GP_REGS : ALL_REGS) 219 #define REGNO_REG_CLASS(REGNO) (GP_REG_P (REGNO) ? GP_REGS : ALL_REGS)
220 #define CLASS_MAX_NREGS(CLASS, MODE) \ 220 #define CLASS_MAX_NREGS(CLASS, MODE) \
221 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) 221 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
222 222
223 #define CDX_REG_P(REGNO) \ 223 #define CDX_REG_P(REGNO) \
224 ((REGNO) == 16 || (REGNO) == 17 || (2 <= (REGNO) && (REGNO) <= 7)) 224 ((REGNO) == 16 || (REGNO) == 17 || ((REGNO) >= 2 && (REGNO) <= 7))
225 225
226 /* Tests for various kinds of constants used in the Nios II port. */ 226 /* Tests for various kinds of constants used in the Nios II port. */
227 227
228 #define SMALL_INT(X) ((unsigned HOST_WIDE_INT)(X) + 0x8000 < 0x10000) 228 #define SMALL_INT(X) ((unsigned HOST_WIDE_INT)(X) + 0x8000 < 0x10000)
229 #define SMALL_INT12(X) ((unsigned HOST_WIDE_INT)(X) + 0x800 < 0x1000) 229 #define SMALL_INT12(X) ((unsigned HOST_WIDE_INT)(X) + 0x800 < 0x1000)
250 /* Trampolines use a 5-instruction sequence. */ 250 /* Trampolines use a 5-instruction sequence. */
251 #define TRAMPOLINE_SIZE 20 251 #define TRAMPOLINE_SIZE 20
252 252
253 /* Stack layout. */ 253 /* Stack layout. */
254 #define STACK_GROWS_DOWNWARD 1 254 #define STACK_GROWS_DOWNWARD 1
255 #define FRAME_GROWS_DOWNWARD 1
255 #define FIRST_PARM_OFFSET(FUNDECL) 0 256 #define FIRST_PARM_OFFSET(FUNDECL) 0
256 257
257 /* Before the prologue, RA lives in r31. */ 258 /* Before the prologue, RA lives in r31. */
258 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RA_REGNO) 259 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RA_REGNO)
259 #define RETURN_ADDR_RTX(C,F) nios2_get_return_address (C) 260 #define RETURN_ADDR_RTX(C,F) nios2_get_return_address (C)
428 #define BSS_SECTION_ASM_OP "\t.section\t.bss" 429 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
429 430
430 /* Output before 'small' uninitialized data. */ 431 /* Output before 'small' uninitialized data. */
431 #define SBSS_SECTION_ASM_OP "\t.section\t.sbss" 432 #define SBSS_SECTION_ASM_OP "\t.section\t.sbss"
432 433
433 #ifndef IN_LIBGCC2 434 #ifndef USED_FOR_TARGET
434 /* Default the definition of "small data" to 8 bytes. */ 435 /* Default the definition of "small data" to 8 bytes. */
435 extern unsigned HOST_WIDE_INT nios2_section_threshold; 436 extern unsigned HOST_WIDE_INT nios2_section_threshold;
436 #endif 437 #endif
437 438
438 #define NIOS2_DEFAULT_GVALUE 8 439 #define NIOS2_DEFAULT_GVALUE 8