diff options
author | Anatoly Sokolov <aesok@post.ru> | 2011-02-18 20:41:59 +0300 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2011-02-18 20:41:59 +0300 |
commit | 4bf7ff7ebdbceb27859d3ffdee82535c967a97c6 (patch) | |
tree | cc4a50e396c1ab32555eef6fdcf1fd9652b7380f /gcc/config/m32r/m32r.h | |
parent | 7efcf910eeb14928a4230e835a126784e9e196b0 (diff) | |
download | gcc-4bf7ff7ebdbceb27859d3ffdee82535c967a97c6.zip gcc-4bf7ff7ebdbceb27859d3ffdee82535c967a97c6.tar.gz gcc-4bf7ff7ebdbceb27859d3ffdee82535c967a97c6.tar.bz2 |
m32r.h (REG_OK_FOR_BASE_P, [...]): Remove macros.
* config/m32r/m32r.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P,
RTX_OK_FOR_BASE_P, RTX_OK_FOR_OFFSET_P, LEGITIMATE_OFFSET_ADDRESS_P,
LEGITIMATE_LO_SUM_ADDRESS_P, LOAD_POSTINC_P, STORE_PREINC_PREDEC_P,
GO_IF_LEGITIMATE_ADDRESS): Remove macros.
* config/m32r/m32r.c (TARGET_LEGITIMATE_ADDRESS_P): Define.
(m32r_rtx_ok_for_base_p, m32r_rtx_ok_for_offset_p,
m32r_legitimate_offset_addres_p, m32r_legitimate_lo_sum_addres_p,
m32r_load_postinc_p, m32r_store_preinc_predec_p,
m32r_legitimate_address_p): New functions.
* config/m32r/constraints.md (constraint "S"): Don't use
STORE_PREINC_PREDEC_P.
(constraint "U"): Don't use LOAD_POSTINC_P.
From-SVN: r170278
Diffstat (limited to 'gcc/config/m32r/m32r.h')
-rw-r--r-- | gcc/config/m32r/m32r.h | 95 |
1 files changed, 1 insertions, 94 deletions
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index 9b3fbcc..ef24ec1 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, Renesas M32R cpu. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -858,99 +858,6 @@ L2: .word STATIC && (GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF || GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \ && CONST_INT_P (XEXP (XEXP (X, 0), 1)) \ && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (X, 0), 1)) > 32767)) - -/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx - and check its validity for a certain class. - We have two alternate definitions for each of them. - The usual definition accepts all pseudo regs; the other rejects - them unless they have been allocated suitable hard regs. - The symbol REG_OK_STRICT causes the latter definition to be used. - - Most source files want to accept pseudo regs in the hope that - they will get allocated to the class that the insn wants them to be in. - Source files for reload pass need to be strict. - After reload, it makes no difference, since pseudo regs have - been eliminated by then. */ - -#ifdef REG_OK_STRICT - -/* Nonzero if X is a hard reg that can be used as a base reg. */ -#define REG_OK_FOR_BASE_P(X) GPR_P (REGNO (X)) -/* Nonzero if X is a hard reg that can be used as an index. */ -#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) - -#else - -/* 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(X) \ - (GPR_P (REGNO (X)) \ - || (REGNO (X)) == ARG_POINTER_REGNUM \ - || REGNO (X) >= FIRST_PSEUDO_REGISTER) -/* 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(X) REG_OK_FOR_BASE_P (X) - -#endif - -/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression - that is a valid memory address for an instruction. - The MODE argument is the machine mode for the MEM expression - that wants to use this address. */ - -/* Local to this file. */ -#define RTX_OK_FOR_BASE_P(X) (REG_P (X) && REG_OK_FOR_BASE_P (X)) - -/* Local to this file. */ -#define RTX_OK_FOR_OFFSET_P(X) \ - (CONST_INT_P (X) && INT16_P (INTVAL (X))) - -/* Local to this file. */ -#define LEGITIMATE_OFFSET_ADDRESS_P(MODE, X) \ - (GET_CODE (X) == PLUS \ - && RTX_OK_FOR_BASE_P (XEXP (X, 0)) \ - && RTX_OK_FOR_OFFSET_P (XEXP (X, 1))) - -/* Local to this file. */ -/* For LO_SUM addresses, do not allow them if the MODE is > 1 word, - since more than one instruction will be required. */ -#define LEGITIMATE_LO_SUM_ADDRESS_P(MODE, X) \ - (GET_CODE (X) == LO_SUM \ - && (MODE != BLKmode && GET_MODE_SIZE (MODE) <= UNITS_PER_WORD)\ - && RTX_OK_FOR_BASE_P (XEXP (X, 0)) \ - && CONSTANT_P (XEXP (X, 1))) - -/* Local to this file. */ -/* Is this a load and increment operation. */ -#define LOAD_POSTINC_P(MODE, X) \ - (((MODE) == SImode || (MODE) == SFmode) \ - && GET_CODE (X) == POST_INC \ - && REG_P (XEXP (X, 0)) \ - && RTX_OK_FOR_BASE_P (XEXP (X, 0))) - -/* Local to this file. */ -/* Is this an increment/decrement and store operation. */ -#define STORE_PREINC_PREDEC_P(MODE, X) \ - (((MODE) == SImode || (MODE) == SFmode) \ - && (GET_CODE (X) == PRE_INC || GET_CODE (X) == PRE_DEC) \ - && REG_P (XEXP (X, 0)) \ - && RTX_OK_FOR_BASE_P (XEXP (X, 0))) - -#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ - do \ - { \ - if (RTX_OK_FOR_BASE_P (X)) \ - goto ADDR; \ - if (LEGITIMATE_OFFSET_ADDRESS_P ((MODE), (X))) \ - goto ADDR; \ - if (LEGITIMATE_LO_SUM_ADDRESS_P ((MODE), (X))) \ - goto ADDR; \ - if (LOAD_POSTINC_P ((MODE), (X))) \ - goto ADDR; \ - if (STORE_PREINC_PREDEC_P ((MODE), (X))) \ - goto ADDR; \ - } \ - while (0) /* Condition code usage. */ |