aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-03-21 18:54:00 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2001-03-21 17:54:00 +0000
commit70a324958b2556acba361a23255fdf56fa9062aa (patch)
treecf0f93281d4d071af62f33d97703370da8a6005d /gcc/recog.c
parent5db60c46d06cdb6276d257d9ea895a4facb3e718 (diff)
downloadgcc-70a324958b2556acba361a23255fdf56fa9062aa.zip
gcc-70a324958b2556acba361a23255fdf56fa9062aa.tar.gz
gcc-70a324958b2556acba361a23255fdf56fa9062aa.tar.bz2
* recog.c (push_operand): Recognize new format of push instructions.
From-SVN: r40694
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index bf8a3e3..195d3f4 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1358,8 +1358,26 @@ push_operand (op, mode)
op = XEXP (op, 0);
- if (GET_CODE (op) != STACK_PUSH_CODE)
- return 0;
+ if (PUSH_ROUNDING (GET_MODE_SIZE (mode)) == GET_MODE_SIZE (mode))
+ {
+ if (GET_CODE (op) != STACK_PUSH_CODE)
+ return 0;
+ }
+ else
+ {
+ int rounded_size = PUSH_ROUNDING (GET_MODE_SIZE (mode));
+ if (GET_CODE (op) != PRE_MODIFY
+ || GET_CODE (XEXP (op, 1)) != PLUS
+ || XEXP (XEXP (op, 1), 0) != XEXP (op, 0)
+ || GET_CODE (XEXP (XEXP (op, 1), 1)) != CONST_INT
+#ifdef STACK_GROWS_DOWNWARD
+ || INTVAL (XEXP (XEXP (op, 1), 1)) != -rounded_size
+#else
+ || INTVAL (XEXP (XEXP (op, 1), 1)) != rounded_size
+#endif
+ )
+ return 0;
+ }
return XEXP (op, 0) == stack_pointer_rtx;
}