From: Claudiu Zissulescu Date: Tue, 25 Apr 2017 12:03:40 +0000 (+0200) Subject: [ARC] Allow extension core registers to be used for addresses. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f9c5d5c4892e584a42b98f8d8643ce0b7b76490;p=gcc.git [ARC] Allow extension core registers to be used for addresses. gcc/ 2017-04-25 Claudiu Zissulescu * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension core registers. (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise. (REG_OK_FOR_BASE_P_NONSTRICT): Likewise. From-SVN: r247196 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b38b429f38b..e4b71023b70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-04-25 Claudiu Zissulescu + + * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension + core registers. + (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise. + (REG_OK_FOR_BASE_P_NONSTRICT): Likewise. + 2017-04-25 Claudiu Zissulescu * config/arc/arc.c (arc_output_addsi): Check for h-register class diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 1ffb5dec51e..549113070e0 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -640,7 +640,8 @@ extern enum reg_class arc_regno_reg_class[]; #define REGNO_OK_FOR_BASE_P(REGNO) \ ((REGNO) < 29 || ((REGNO) == ARG_POINTER_REGNUM) || ((REGNO) == 63) \ || ((unsigned) reg_renumber[REGNO] < 29) \ - || ((unsigned) (REGNO) == (unsigned) arc_tp_regno)) + || ((unsigned) (REGNO) == (unsigned) arc_tp_regno) \ + || (fixed_regs[REGNO] == 0 && IN_RANGE (REGNO, 32, 59))) #define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO) @@ -922,18 +923,15 @@ extern int arc_initial_elimination_offset(int from, int to); /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */ -#define REG_OK_FOR_INDEX_P_NONSTRICT(X) \ -((unsigned) REGNO (X) >= FIRST_PSEUDO_REGISTER || \ - (unsigned) REGNO (X) < 29 || \ - (unsigned) REGNO (X) == 63 || \ - (unsigned) REGNO (X) == ARG_POINTER_REGNUM) +#define REG_OK_FOR_INDEX_P_NONSTRICT(X) \ + ((unsigned) REGNO (X) >= FIRST_PSEUDO_REGISTER \ + || REGNO_OK_FOR_BASE_P (REGNO (X))) + /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ -#define REG_OK_FOR_BASE_P_NONSTRICT(X) \ -((unsigned) REGNO (X) >= FIRST_PSEUDO_REGISTER || \ - (unsigned) REGNO (X) < 29 || \ - (unsigned) REGNO (X) == 63 || \ - (unsigned) REGNO (X) == ARG_POINTER_REGNUM) +#define REG_OK_FOR_BASE_P_NONSTRICT(X) \ + ((unsigned) REGNO (X) >= FIRST_PSEUDO_REGISTER \ + || REGNO_OK_FOR_BASE_P (REGNO (X))) /* Nonzero if X is a hard reg that can be used as an index. */ #define REG_OK_FOR_INDEX_P_STRICT(X) REGNO_OK_FOR_INDEX_P (REGNO (X))