Message ID | 4E2518C3.8060906@codesourcery.com |
---|---|
State | New |
Headers | show |
Sandra Loosemore <sandra@codesourcery.com> writes: > I've been experimenting with a patch that adds a new define_peephole2 > for MIPS. It was blowing up with a segfault in insn-recog.c while > building libstdc++, and looking at the generated code for my new pattern > there was clearly a bad offset being passed to peep2_next_insn. I > tracked it down to a regression from r174305, Richard's patch to add a > new data structure to keep track of positions in genrecog.c. Sorry :-( Patch looks OK to me, but I can't approve it. Richard
On 07/20/11 13:24, Richard Sandiford wrote: > Sandra Loosemore <sandra@codesourcery.com> writes: >> I've been experimenting with a patch that adds a new define_peephole2 >> for MIPS. It was blowing up with a segfault in insn-recog.c while >> building libstdc++, and looking at the generated code for my new pattern >> there was clearly a bad offset being passed to peep2_next_insn. I >> tracked it down to a regression from r174305, Richard's patch to add a >> new data structure to keep track of positions in genrecog.c. > > Sorry :-( > > Patch looks OK to me, but I can't approve it. Looks like the SC has some more things to fix. Ok for the patch. Bernd
Index: genrecog.c =================================================================== --- genrecog.c (revision 176433) +++ genrecog.c (working copy) @@ -2345,7 +2345,7 @@ make_insn_sequence (rtx insn, enum routi if (GET_CODE (tmp) != MATCH_SCRATCH && GET_CODE (tmp) != MATCH_DUP) { c_test_pos = next_position (pos_ptr, &root_pos, - POS_PEEP2_INSN, i); + POS_PEEP2_INSN, j); XVECEXP (x, 0, j) = tmp; j++; pos_ptr = &c_test_pos->next;