diff options
author | Falk Hueffner <falk@debian.org> | 2004-01-21 16:52:47 +0100 |
---|---|---|
committer | Falk Hueffner <falk@gcc.gnu.org> | 2004-01-21 16:52:47 +0100 |
commit | c3cda381c7dec4b95c20275629acc7194c68a324 (patch) | |
tree | 37367da45f4215337dea933b9a36d8ec0bf69abd /gcc | |
parent | 3e7782b2f8f11acc3122ce20380ef91351b0d1c0 (diff) | |
download | gcc-c3cda381c7dec4b95c20275629acc7194c68a324.zip gcc-c3cda381c7dec4b95c20275629acc7194c68a324.tar.gz gcc-c3cda381c7dec4b95c20275629acc7194c68a324.tar.bz2 |
re PR target/12898 (Tru64 UNIX bootstrap failure: ICE in gen_reg_rtx, at emit-rtl.c:819)
PR target/12898
* config/alpha/alpha.c (alpha_emit_set_const_1): If
no_new_pseudos, use gen_rtx_SET directly for SImode constants
which need multiple instructions to emit.
* testsuite/gcc.c-torture/compile/20040121-1.c: New test.
From-SVN: r76283
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20040121-1.c | 41 |
4 files changed, 60 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5eaac36..ac0537f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-01-21 Falk Hueffner <falk@debian.org> + + PR target/12898 + * config/alpha/alpha.c (alpha_emit_set_const_1): If + no_new_pseudos, use gen_rtx_SET directly for SImode constants + which need multiple instructions to emit. + 2004-01-21 Inaoka Kazuhiro <inaoka.kazuhiro@renesas.com> * config/m32r/m32r.h (CPP_SPEC): Define. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index f6485a0..581d344 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -2503,7 +2503,14 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode, } else if (n >= 2 + (extra != 0)) { - temp = copy_to_suggested_reg (GEN_INT (high << 16), subtarget, mode); + if (no_new_pseudos) + { + emit_insn (gen_rtx_SET (VOIDmode, target, GEN_INT (high << 16))); + temp = target; + } + else + temp = copy_to_suggested_reg (GEN_INT (high << 16), + subtarget, mode); /* As of 2002-02-23, addsi3 is only available when not optimizing. This means that if we go through expand_binop, we'll try to diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b022b8..35f7953 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-01-21 Falk Hueffner <falk@debian.org> + + * gcc.c-torture/compile/20040121-1.c: New test. + 2004-01-21 Zack Weinberg <zack@codesourcery.com> * gcc.dg/noncompile/20020213-1.c: Add another dg-warning line. diff --git a/gcc/testsuite/gcc.c-torture/compile/20040121-1.c b/gcc/testsuite/gcc.c-torture/compile/20040121-1.c new file mode 100644 index 0000000..2039472 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20040121-1.c @@ -0,0 +1,41 @@ +/* PR target/12898 + 0x8000 needs multiple instructions to be emitted on Alpha; the + fluff around it causes it to be emitted in a no_new_pseudos + context, which triggered a problem in alpha.c. */ + +void f (const char *, ...); +int g (void); +void *p (void); + +int isymBase, ilineBase, sym_hdr, want_line, proc_desc; +char *lines; + +void print_file_desc (int *fdp) +{ + char *str_base = p (); + int symi, pdi = g (); + + for (symi = 0; isymBase;) + { + int proc_ptr = proc_desc + pdi; + f("1", isymBase, proc_ptr + *fdp, str_base); + if (want_line && *fdp) + { + int delta; + long cur_line = proc_ptr; + char *line_ptr = lines + proc_ptr; + char *line_end = p (); + + f("2", sym_hdr); + while (line_ptr < line_end) + { + delta = *line_ptr; + if (delta) + line_ptr++; + else + delta = line_ptr[1] ^ 0x8000; + f("3", cur_line, delta); + } + } + } +} |