Mercurial > hg > CbC > CbC_gcc
diff gcc/config/arc/arc.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/config/arc/arc.h Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/config/arc/arc.h Thu Oct 25 07:37:49 2018 +0900 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, Synopsys DesignWare ARC cpu. - Copyright (C) 1994-2017 Free Software Foundation, Inc. + Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of GCC. @@ -141,9 +141,6 @@ /* Should we try to unalign likely taken branches without a delay slot. */ #define TARGET_UNALIGN_BRANCH (TARGET_ARC700 && !optimize_size) -/* Should we upsize short delayed branches with a short delay insn? */ -#define TARGET_UPSIZE_DBR (TARGET_ARC700 && !optimize_size) - /* Should we add padding before a return insn to avoid mispredict? */ #define TARGET_PAD_RETURN (TARGET_ARC700 && !optimize_size) @@ -288,7 +285,7 @@ /* On the ARC the lower address bits are masked to 0 as necessary. The chip won't croak when given an unaligned address, but the insn will still fail to produce the correct result. */ -#define STRICT_ALIGNMENT 1 +#define STRICT_ALIGNMENT (!unaligned_access && !TARGET_HS) /* Layout of source language data types. */ @@ -727,7 +724,7 @@ ((CUM) = 0) /* The number of registers used for parameter passing. Local to this file. */ -#define MAX_ARC_PARM_REGS 8 +#define MAX_ARC_PARM_REGS (TARGET_RF16 ? 4 : 8) /* 1 if N is a possible register number for function argument passing. */ #define FUNCTION_ARG_REGNO_P(N) \ @@ -822,14 +819,14 @@ fprintf (FILE, "\tbl\t__mcount@plt\n"); \ else \ fprintf (FILE, "\tbl\t__mcount\n"); \ - } while (0); + } while (0) #define NO_PROFILE_COUNTERS 1 /* Trampolines. */ /* Length in units of the trampoline for entering a nested function. */ -#define TRAMPOLINE_SIZE 20 +#define TRAMPOLINE_SIZE 16 /* Alignment required for a trampoline in bits . */ /* For actual data alignment we just need 32, no more than the stack; @@ -1224,7 +1221,15 @@ { \ {"ilink", 29}, \ {"r29", 29}, \ - {"r30", 30} \ + {"r30", 30}, \ + {"r40", 40}, \ + {"r41", 41}, \ + {"r42", 42}, \ + {"r43", 43}, \ + {"r56", 56}, \ + {"r57", 57}, \ + {"r58", 58}, \ + {"r59", 59} \ } /* Entry to the insn conditionalizer. */ @@ -1291,7 +1296,8 @@ do \ { \ if (GET_CODE (PATTERN (JUMPTABLE)) == ADDR_DIFF_VEC \ - && ((GET_MODE_SIZE (GET_MODE (PATTERN (JUMPTABLE))) \ + && ((GET_MODE_SIZE (as_a <scalar_int_mode> \ + (GET_MODE (PATTERN (JUMPTABLE)))) \ * XVECLEN (PATTERN (JUMPTABLE), 1) + 1) \ & 2)) \ arc_toggle_unalign (); \ @@ -1365,8 +1371,11 @@ /* Frame info. */ -#define EH_RETURN_DATA_REGNO(N) \ - ((N) < 4 ? (N) : INVALID_REGNUM) +#define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) : INVALID_REGNUM) + +#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 2) + +#define EH_RETURN_HANDLER_RTX arc_eh_return_address_location () /* Turn off splitting of long stabs. */ #define DBX_CONTIN_LENGTH 0 @@ -1402,10 +1411,11 @@ : SImode) #define ADDR_VEC_ALIGN(VEC_INSN) \ - (exact_log2 (GET_MODE_SIZE (GET_MODE (PATTERN (VEC_INSN))))) + (exact_log2 (GET_MODE_SIZE (as_a <scalar_int_mode> \ + (GET_MODE (PATTERN (VEC_INSN)))))) #undef ASM_OUTPUT_BEFORE_CASE_LABEL #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \ - ASM_OUTPUT_ALIGN ((FILE), ADDR_VEC_ALIGN (TABLE)); + ASM_OUTPUT_ALIGN ((FILE), ADDR_VEC_ALIGN (TABLE)) #define INSN_LENGTH_ALIGNMENT(INSN) \ ((JUMP_TABLE_DATA_P (INSN) \ @@ -1625,5 +1635,7 @@ /* Custom FP instructions used by QuarkSE EM cpu. */ #define TARGET_FPX_QUARK (TARGET_EM && TARGET_SPFP \ && (arc_fpu_build == FPX_QK)) +/* DBNZ support is available for ARCv2 core3 and newer cpus. */ +#define TARGET_DBNZ (TARGET_V2 && (arc_tune >= ARC_TUNE_CORE_3)) #endif /* GCC_ARC_H */