diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-06 20:09:04 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-06 20:09:04 +0000 |
commit | 4d05f7baf5025e53aa0e8a690387627dddfe04df (patch) | |
tree | c7978d0b02dbf357a24f4f4533ab561007f35730 /gcc | |
parent | 4fa124716fa46d5849d8e7158bd14b0ce8286c22 (diff) | |
download | gcc-4d05f7baf5025e53aa0e8a690387627dddfe04df.tar.gz |
* reload1.c (eliminate_regs_in_insn): Allow a set to be a PARALLEL
with (clobber (match_scratch...)).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37281 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reload1.c | 19 |
2 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f24e1838027..0bf70491b09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 6 20:08:13 2000 J"orn Rennecke <amylaar@redhat.com> + + * reload1.c (eliminate_regs_in_insn): Allow a set to be a PARALLEL + with (clobber (match_scratch...)). + 2000-11-06 Neil Booth <neilb@earthling.net> * c-lex.c (init_c_lex): If cpp_start_read fails, exit with diff --git a/gcc/reload1.c b/gcc/reload1.c index 66c98f54595..9e985e445b2 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2953,13 +2953,24 @@ eliminate_regs_in_insn (insn, replace) if (offset == 0) { - /* We assume here that we don't need a PARALLEL of - any CLOBBERs for this assignment. There's not - much we can do if we do need it. */ + int num_clobbers; + /* We assume here that if we need a PARALLEL with + CLOBBERs for this assignment, we can do with the + MATCH_SCRATCHes that add_clobbers allocates. + There's not much we can do if that doesn't work. */ PATTERN (insn) = gen_rtx_SET (VOIDmode, SET_DEST (old_set), ep->to_rtx); - INSN_CODE (insn) = recog (PATTERN (insn), insn, 0); + num_clobbers = 0; + INSN_CODE (insn) = recog (PATTERN (insn), insn, &num_clobbers); + if (num_clobbers) + { + rtvec vec = rtvec_alloc (num_clobbers + 1); + + vec->elem[0] = PATTERN (insn); + PATTERN (insn) = gen_rtx_PARALLEL (VOIDmode, vec); + add_clobbers (PATTERN (insn), INSN_CODE (insn)); + } if (INSN_CODE (insn) < 0) abort (); } |