* config/xtensa/predicates.md (call expander): Update for
[official-gcc.git] / contrib / reghunt / bin / reg-newmid
blob2a6b57362baac612fb99e540efbce4095ac01be9
1 #! /bin/sh
3 # The build failed for and identifier in the range bwetween LOW and HIGH.
4 # Find a new patch id to try within that range.
6 # It's meant to be easy to modify the heuristics used to select the
7 # next patch to try by adding to or rearranging the patches listed in
8 # MIDLIST. Known failures are recorded in ${REG_FAILLIST}.
10 # A nifty improvement would be to record known ranges of failure as
11 # ranges, and then pick revisions just before and just after the range.
13 # Copyright (C) 2006 Free Software Foundation, Inc.
15 # This file is free software; you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 3 of the License, or
18 # (at your option) any later version.
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # For a copy of the GNU General Public License, write the the
26 # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27 # Boston, MA 02111-1301, USA.
29 LOW=$1
30 HIGH=$2
32 MIDLIST=""
34 let MID01=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH
35 let MID01=MID01/12
36 let MID02=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH
37 let MID02=MID02/12
38 let MID03=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH
39 let MID03=MID03/12
40 let MID04=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH
41 let MID04=MID04/12
42 let MID05=LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH
43 let MID05=MID05/12
44 let MID06=LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
45 let MID06=MID06/12
46 let MID07=LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
47 let MID07=MID07/12
48 let MID08=LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
49 let MID08=MID08/12
50 let MID09=LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
51 let MID09=MID09/12
52 let MID10=LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
53 let MID10=MID10/12
54 let MID11=LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
55 let MID11=MID11/12
57 # Look in this order; MID has already been done:
59 # LOW--10---7---6---3---2---MID---1---4---5---8---9---HIGH
61 MIDLIST="${MIDLIST} ${MID07}"
62 MIDLIST="${MIDLIST} ${MID05}"
63 MIDLIST="${MIDLIST} ${MID04}"
64 MIDLIST="${MIDLIST} ${MID08}"
65 MIDLIST="${MIDLIST} ${MID09}"
66 MIDLIST="${MIDLIST} ${MID03}"
67 MIDLIST="${MIDLIST} ${MID02}"
68 MIDLIST="${MIDLIST} ${MID10}"
69 MIDLIST="${MIDLIST} ${MID11}"
70 MIDLIST="${MIDLIST} ${MID01}"
72 for MID in ${MIDLIST}
74 # Skip this if it's the low endpoint.
75 if [ ${MID} != ${LOW} ]; then
76 # Is this patch already known to fail?
77 ${REG_CHECKFAIL} ${MID}
78 if [ $? -ne 0 ]; then
79 echo ${MID}
80 exit 0
83 done
85 echo 0
86 exit 1