From 70a324958b2556acba361a23255fdf56fa9062aa Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 21 Mar 2001 18:54:00 +0100 Subject: [PATCH] * recog.c (push_operand): Recognize new format of push instructions. From-SVN: r40694 --- gcc/ChangeLog | 4 ++++ gcc/recog.c | 22 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90ab3876c38..15dabb08405 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Wed Mar 21 18:51:19 CET 2001 Jan Hubicka + + * recog.c (push_operand): Recognize new format of push instructions. + Wed Mar 21 10:53:57 CET 2001 Jan Hubicka * i386.md (pushqi1): New. diff --git a/gcc/recog.c b/gcc/recog.c index bf8a3e37087..195d3f4c2c9 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; }