This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 fix
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: i386 fix
- From: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 28 Jul 2000 01:36:54 +0200
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, "Jeffrey A. Law" <law at cygnus dot com>
- References: <20000721013533.I27092@atrey.karlin.mff.cuni.cz> <20000725144256.G23874@cygnus.com> <20000727183937.D17524@atrey.karlin.mff.cuni.cz> <20000727101609.A27043@cygnus.com>
> On Thu, Jul 27, 2000 at 06:39:37PM +0200, Jan Hubicka wrote:
> > The loops in reload seems to suggest this theory and all the macros
> > like HARD_REGNO_MODE_OK etc. just accept it and the SECONDARY_MEMORY_NEEDED
> > claims that direct move is possible.
>
> But the registers are in NO_REGS, so they should never be selected,
> since they are not of the correct class.
Hi,
Here is the testcase, that produces crash for me with -O3 -march=athlon
-funroll-all-loops .
I will investigate this more tomorrow.
static const float cross_count[50] =
{
1.0, 1.0, 1.0, 1.0828, 1.1536, 1.2206, 1.2823, 1.3385, 1.3991, 1.4493,
1.4974, 1.5455, 1.5937, 1.6418, 1.6899, 1.7304, 1.7709, 1.8114, 1.8519, 1.8924,
1.9288, 1.9652, 2.0015, 2.0379, 2.0743, 2.1061, 2.1379, 2.1698, 2.2016, 2.2334,
2.2646, 2.2958, 2.3271, 2.3583, 2.3895, 2.4187, 2.4479, 2.4772, 2.5064, 2.5356,
2.5610, 2.5864, 2.6117, 2.6371, 2.6625, 2.6887, 2.7148, 2.7410, 2.7671, 2.7933};
struct s_bb
{
int xmin;
int xmax;
int ymin;
int ymax;
};
struct s_net
{
char *name;
int num_pins;
int *pins;
float ncost;
float tempcost;
};
extern struct s_net *net;
extern int nx, ny, io_rat, pins_per_clb;
struct s_place_region
{
float capacity;
float inv_capacity;
float occupancy;
float cost;
};
static struct s_place_region **place_region_x, **place_region_y;
static float *place_region_bounds_x, *place_region_bounds_y;
static void
update_region_occ (int inet, struct s_bb *coords,
int add_or_sub, int num_regions)
{
float net_xmin, net_xmax, net_ymin, net_ymax, crossing;
float inv_region_len, inv_region_height;
float inv_bb_len, inv_bb_height;
float overlap_xlow, overlap_xhigh, overlap_ylow, overlap_yhigh;
float y_overlap, x_overlap, x_occupancy, y_occupancy;
int imin, imax, jmin, jmax, i, j;
if (net[inet].num_pins > 50)
{
crossing = 2.7933 + 0.02616 * (net[inet].num_pins - 50);
}
else
{
crossing = cross_count[net[inet].num_pins - 1];
}
net_xmin = coords->xmin - 0.5;
net_xmax = coords->xmax + 0.5;
net_ymin = coords->ymin - 0.5;
net_ymax = coords->ymax + 0.5;
inv_region_len = (float) num_regions / (float) nx;
inv_region_height = (float) num_regions / (float) ny;
#1518 "place.c"
imin = (int) (net_xmin - 0.5) * inv_region_len;
imax = (int) (net_xmax - 0.5) * inv_region_len;
imax = ((imax) > (num_regions - 1) ? (num_regions - 1) : (imax));
jmin = (int) (net_ymin - 0.5) * inv_region_height;
jmax = (int) (net_ymax - 0.5) * inv_region_height;
jmax = ((jmax) > (num_regions - 1) ? (num_regions - 1) : (jmax));
inv_bb_len = 1. / (net_xmax - net_xmin);
inv_bb_height = 1. / (net_ymax - net_ymin);
for (i = imin; i <= imax; i++)
{
for (j = jmin; j <= jmax; j++)
{
overlap_xlow = (((place_region_bounds_x[i]) > (net_xmin)) ? (place_region_bounds_x[i]) : (net_xmin));
overlap_xhigh = ((place_region_bounds_x[i + 1]) > (net_xmax) ? (net_xmax) : (place_region_bounds_x[i + 1]));
overlap_ylow = (((place_region_bounds_y[j]) > (net_ymin)) ? (place_region_bounds_y[j]) : (net_ymin));
overlap_yhigh = ((place_region_bounds_y[j + 1]) > (net_ymax) ? (net_ymax) : (place_region_bounds_y[j + 1]));
x_overlap = overlap_xhigh - overlap_xlow;
y_overlap = overlap_yhigh - overlap_ylow;
#1556 "place.c"
x_occupancy = crossing * y_overlap * x_overlap * inv_bb_height *
inv_region_len;
y_occupancy = crossing * x_overlap * y_overlap * inv_bb_len *
inv_region_height;
place_region_x[i][j].occupancy += add_or_sub * x_occupancy;
place_region_y[i][j].occupancy += add_or_sub * y_occupancy;
}
}
}