aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2001-11-30 00:17:49 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2001-11-30 00:17:49 +0000
commitd3295e2542fa696d591b4ffb6576fb4a57827f53 (patch)
treec6a2e44319bb55ffb73fb989348151b9e345aec2 /gcc
parentc65fd410e91c87f9dcc07a6486478dd5c0508aee (diff)
downloadgcc-d3295e2542fa696d591b4ffb6576fb4a57827f53.zip
gcc-d3295e2542fa696d591b4ffb6576fb4a57827f53.tar.gz
gcc-d3295e2542fa696d591b4ffb6576fb4a57827f53.tar.bz2
cris.c (cris_notice_update_cc): Check first destination also against overlap with cc_status.value2 and second...
* config/cris/cris.c (cris_notice_update_cc): Check first destination also against overlap with cc_status.value2 and second destination against overlap with cc_status.value1. For overlaps, clear overlapped value, don't just CC_STATUS_INIT. * config/cris/cris.h (EXTRA_CONSTRAINT_T): Fix spacing and FIXME. (LINK_SPEC): Remove whitespace at end of line. From-SVN: r47463
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/cris/cris.c39
-rw-r--r--gcc/config/cris/cris.h11
3 files changed, 42 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8370ef9..5e0e316 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2001-11-30 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/cris.c (cris_notice_update_cc): Check first
+ destination also against overlap with cc_status.value2 and second
+ destination against overlap with cc_status.value1. For overlaps,
+ clear overlapped value, don't just CC_STATUS_INIT.
+
+ * config/cris/cris.h (EXTRA_CONSTRAINT_T): Fix spacing and FIXME.
+ (LINK_SPEC): Remove whitespace at end of line.
+
2001-11-29 Jakub Jelinek <jakub@redhat.com>
* c-lex.c (init_c_lex): Canonicalize "-" filename to "".
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 6ea1fc1..e5b634f 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -1953,17 +1953,34 @@ cris_notice_update_cc (exp, insn)
{
/* For "move.S rz,[rx=ry+o]" and "clear.S [rx=ry+o]",
say flags are not changed, except for overlap. */
- if ((cc_status.value1
- && cris_reg_overlap_mentioned_p (XEXP
- (XVECEXP
- (exp, 0, 0), 0),
- cc_status.value1))
- || (cc_status.value2
- && cris_reg_overlap_mentioned_p (XEXP
- (XVECEXP
- (exp, 0, 1), 0),
- cc_status.value2)))
- CC_STATUS_INIT;
+ if (cc_status.value1
+ && cris_reg_overlap_mentioned_p (XEXP
+ (XVECEXP
+ (exp, 0, 0), 0),
+ cc_status.value1))
+ cc_status.value1 = 0;
+
+ if (cc_status.value1
+ && cris_reg_overlap_mentioned_p (XEXP
+ (XVECEXP
+ (exp, 0, 1), 0),
+ cc_status.value1))
+ cc_status.value1 = 0;
+
+ if (cc_status.value2
+ && cris_reg_overlap_mentioned_p (XEXP
+ (XVECEXP
+ (exp, 0, 0), 0),
+ cc_status.value2))
+ cc_status.value2 = 0;
+
+ if (cc_status.value2
+ && cris_reg_overlap_mentioned_p (XEXP
+ (XVECEXP
+ (exp, 0, 1), 0),
+ cc_status.value2))
+ cc_status.value2 = 0;
+
return;
}
}
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 40f01a6..e5cd2d1 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -204,7 +204,7 @@ extern const char *cris_elinux_stacksize_str;
#undef LINK_SPEC
#define LINK_SPEC \
"%{v:--verbose}\
- %(link_subtarget)"
+ %(link_subtarget)"
/* For the cris-*-elf subtarget. */
#define CRIS_LINK_SUBTARGET_SPEC \
@@ -775,16 +775,13 @@ enum reg_class {NO_REGS, ALL_REGS, LIM_REG_CLASSES};
|| CONSTANT_INDEX_P (X) \
)
-/* FIXME: Bug below: We can't have XEXP (X, 0)) both be MEM and a
- CONSTANT_P. Parens don't match indentation. */
-
#define EXTRA_CONSTRAINT_T(X) \
( \
- /* Three-address-operands. All are indirect-memory: */ \
+ /* Memory three-address operand. All are indirect-memory: */ \
GET_CODE (X) == MEM \
&& ((GET_CODE (XEXP (X, 0)) == MEM \
- /* Double indirect: [[reg]] or [[reg+]]? */ \
- && (BASE_OR_AUTOINCR_P (XEXP (XEXP (X, 0), 0)))) \
+ /* Double indirect: [[reg]] or [[reg+]]? */ \
+ && (BASE_OR_AUTOINCR_P (XEXP (XEXP (X, 0), 0)))) \
/* Just an explicite indirect reference: [const]? */ \
|| CONSTANT_P (XEXP (X, 0)) \
/* Something that is indexed; [...+...]? */ \