* 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.
From-SVN: r170367
+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
/* 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.
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);
/* 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.
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
#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
/* 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.
#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
\f