summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-21 16:22:21 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-21 16:22:21 +0000
commite53c7df36876a933af89f01f64a75e5fc7833597 (patch)
tree66a53ffeb55210da014056390eb6a3d94607f16c
parenta32603a9cf1a8455bc330748f625767d90fc77b6 (diff)
downloadgcc-e53c7df36876a933af89f01f64a75e5fc7833597.tar.gz
* config/stormy16/stormy16.h (GO_IF_MODE_DEPENDENT_ADDRESS): Remove.
* config/stormy16/stormy16-protos.h (xstormy16_mode_dependent_address_p): Remove. * config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p): Make static. Change return type to bool. Change argument type to const_rtx. Remove dead code. (TARGET_MODE_DEPENDENT_ADDRESS_P): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170367 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/stormy16/stormy16-protos.h3
-rw-r--r--gcc/config/stormy16/stormy16.c29
-rw-r--r--gcc/config/stormy16/stormy16.h10
4 files changed, 21 insertions, 31 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fbd8007c99d..47bca58aad1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2011-02-21 Anatoly Sokolov <aesok@post.ru>
+
+ * config/stormy16/stormy16.h (GO_IF_MODE_DEPENDENT_ADDRESS): Remove.
+ * config/stormy16/stormy16-protos.h
+ (xstormy16_mode_dependent_address_p): Remove.
+ * config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p):
+ Make static. Change return type to bool. Change argument type to
+ const_rtx. Remove dead code.
+ (TARGET_MODE_DEPENDENT_ADDRESS_P): Define.
+
2011-02-21 Richard Guenther <rguenther@suse.de>
PR lto/47820
diff --git a/gcc/config/stormy16/stormy16-protos.h b/gcc/config/stormy16/stormy16-protos.h
index ad44e154fae..5b4957b99c5 100644
--- a/gcc/config/stormy16/stormy16-protos.h
+++ b/gcc/config/stormy16/stormy16-protos.h
@@ -1,5 +1,5 @@
/* Prototypes for exported functions defined in xstormy16.c
- Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010
+ Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008, 2010, 2011
Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
@@ -44,7 +44,6 @@ extern rtx xstormy16_function_value (const_tree, const_tree);
extern void xstormy16_emit_cbranch (enum rtx_code, rtx, rtx, rtx);
extern char *xstormy16_output_cbranch_hi (rtx, const char *, int, rtx);
extern char *xstormy16_output_cbranch_si (rtx, const char *, int, rtx);
-extern int xstormy16_mode_dependent_address_p (rtx);
extern void xstormy16_print_operand (FILE *, rtx, int);
extern void xstormy16_print_operand_address (FILE *, rtx);
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index e4cd10e2764..120c5ec95f8 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -1,6 +1,6 @@
/* Xstormy16 target functions.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GCC.
@@ -647,40 +647,27 @@ xstormy16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
return false;
}
-/* Return nonzero if memory address X (an RTX) can have different
- meanings depending on the machine mode of the memory reference it
- is used for or if the address is valid for some modes but not
- others.
-
- Autoincrement and autodecrement addresses typically have mode-dependent
- effects because the amount of the increment or decrement is the size of the
- operand being addressed. Some machines have other mode-dependent addresses.
- Many RISC machines have no mode-dependent addresses.
-
- You may assume that ADDR is a valid address for the machine.
+/* Worker function for TARGET_MODE_DEPENDENT_ADDRESS_P.
On this chip, this is true if the address is valid with an offset
of 0 but not of 6, because in that case it cannot be used as an
address for DImode or DFmode, or if the address is a post-increment
or pre-decrement address. */
-int
-xstormy16_mode_dependent_address_p (rtx x)
+static bool
+xstormy16_mode_dependent_address_p (const_rtx x)
{
if (LEGITIMATE_ADDRESS_CONST_INT_P (x, 0)
&& ! LEGITIMATE_ADDRESS_CONST_INT_P (x, 6))
- return 1;
+ return true;
if (GET_CODE (x) == PLUS
&& LEGITIMATE_ADDRESS_INTEGER_P (XEXP (x, 1), 0)
&& ! LEGITIMATE_ADDRESS_INTEGER_P (XEXP (x, 1), 6))
- return 1;
-
- if (GET_CODE (x) == PLUS)
- x = XEXP (x, 0);
+ return true;
/* Auto-increment addresses are now treated generically in recog.c. */
- return 0;
+ return false;
}
int
@@ -2619,6 +2606,8 @@ static const struct default_options xstorym16_option_optimization_table[] =
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P xstormy16_legitimate_address_p
+#undef TARGET_MODE_DEPENDENT_ADDRESS_P
+#define TARGET_MODE_DEPENDENT_ADDRESS_P xstormy16_mode_dependent_address_p
#undef TARGET_CAN_ELIMINATE
#define TARGET_CAN_ELIMINATE xstormy16_can_eliminate
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index c92af1dbd8a..0a2bc7690f5 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -1,6 +1,6 @@
/* Xstormy16 cpu description.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
- 2008, 2009, 2010 Free Software Foundation, Inc.
+ 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GCC.
@@ -371,14 +371,6 @@ enum reg_class
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
-/* On this chip, this is true if the address is valid with an offset
- of 0 but not of 6, because in that case it cannot be used as an
- address for DImode or DFmode, or if the address is a post-increment
- or pre-decrement address. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- if (xstormy16_mode_dependent_address_p (ADDR)) \
- goto LABEL
-
#define LEGITIMATE_CONSTANT_P(X) 1