summaryrefslogtreecommitdiff
path: root/gcc/config/stormy16/stormy16.c
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-14 20:59:19 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-14 20:59:19 +0000
commitee34ed40f85d9d1eb712f732609997d73843846b (patch)
treed8299400e9d59702656cfe7eb88af6219a457784 /gcc/config/stormy16/stormy16.c
parent9f5eade01a475b766d3c95322a0f2f2e97fae021 (diff)
downloadgcc-ee34ed40f85d9d1eb712f732609997d73843846b.tar.gz
make stormy16 use constraints.md
* config/stormy16/constraints.md: New file. * config/stormy16/predicates.md (nonimmediate_nonstack_operand): Use satisfies_constraint_Q and satisfies_constraint_R. * config/stormy16/stomry16-protos.h (xstormy16_extra_constraint_p): Delete. (xstormy16_legitiamte_address_p): Declare. * config/stormy16/stormy16.h (REG_CLASS_FROM_LETTER): Delete. (CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P): Delete. (EXTRA_CONSTRAINT): Delete. * config/stormy16/stormy16.c (xstormy16_legitiamte_address_p): Un-staticize. (xstormy16_extra_constraint_p): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/stormy16/stormy16.c')
-rw-r--r--gcc/config/stormy16/stormy16.c56
1 files changed, 1 insertions, 55 deletions
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index fa5c5b5a8dc..e4cd10e2764 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -615,7 +615,7 @@ xstormy16_expand_andqi3 (rtx *operands)
&& INTVAL (X) + (OFFSET) < 0x8000 \
&& (INTVAL (X) + (OFFSET) < 0x100 || INTVAL (X) + (OFFSET) >= 0x7F00))
-static bool
+bool
xstormy16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x, bool strict)
{
@@ -683,60 +683,6 @@ xstormy16_mode_dependent_address_p (rtx x)
return 0;
}
-/* A C expression that defines the optional machine-dependent constraint
- letters (`Q', `R', `S', `T', `U') that can be used to segregate specific
- types of operands, usually memory references, for the target machine.
- Normally this macro will not be defined. If it is required for a particular
- target machine, it should return 1 if VALUE corresponds to the operand type
- represented by the constraint letter C. If C is not defined as an extra
- constraint, the value returned should be 0 regardless of VALUE. */
-
-int
-xstormy16_extra_constraint_p (rtx x, int c)
-{
- switch (c)
- {
- /* 'Q' is for pushes. */
- case 'Q':
- return (MEM_P (x)
- && GET_CODE (XEXP (x, 0)) == POST_INC
- && XEXP (XEXP (x, 0), 0) == stack_pointer_rtx);
-
- /* 'R' is for pops. */
- case 'R':
- return (MEM_P (x)
- && GET_CODE (XEXP (x, 0)) == PRE_DEC
- && XEXP (XEXP (x, 0), 0) == stack_pointer_rtx);
-
- /* 'S' is for immediate memory addresses. */
- case 'S':
- return (MEM_P (x)
- && CONST_INT_P (XEXP (x, 0))
- && xstormy16_legitimate_address_p (VOIDmode, XEXP (x, 0), 0));
-
- /* 'T' is for Rx. */
- case 'T':
- /* Not implemented yet. */
- return 0;
-
- /* 'U' is for CONST_INT values not between 2 and 15 inclusive,
- for allocating a scratch register for 32-bit shifts. */
- case 'U':
- return (CONST_INT_P (x) && (! IN_RANGE (INTVAL (x), 2, 15)));
-
- /* 'Z' is for CONST_INT value zero. This is for adding zero to
- a register in addhi3, which would otherwise require a carry. */
- case 'Z':
- return (CONST_INT_P (x) && (INTVAL (x) == 0));
-
- case 'W':
- return xstormy16_below100_operand (x, GET_MODE (x));
-
- default:
- return 0;
- }
-}
-
int
short_memory_operand (rtx x, enum machine_mode mode)
{