This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-19991228 + sco openserver 5 gets sco as warning from a -129 byte literal
- To: William Bader <william at nscs dot fast dot net>
- Subject: Re: egcs-19991228 + sco openserver 5 gets sco as warning from a -129 byte literal
- From: Robert Lipe <robertlipe at usa dot net>
- Date: Mon, 10 Jan 2000 15:34:52 -0600
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <10001101530.aa07161@mip486.nscs.fast.net>
X86 wizards, I've simplified William's test case and attached it. I've
also verified that it occurs in the sources as of this morning. this is
probably just something that's signed that shouldn't be, but it isn't
obvious to me what that would be.
$ ./xgcc -B./ -dA --save-temps -c -O /tmp/util.c
util.s:56:literal value does not fit
The offending assembler is this:
.L3:
fldl -8(%ebp)
fsubl 16(%ebp)
fstpl -16(%ebp)
fldl -8(%ebp)
fmull 16(%ebp)
faddl .LC2
fdivrl -16(%ebp)
fstpl -16(%ebp)
andb $-129, -9(%ebp) // This is line 56
subl $12, %esp
RJL
William Bader wrote:
> I am using egcs-19991228 on a Pentium II system under SCO OpenServer
> 5.0.5 and the OpenServer 5.0.5 development systems. I built egcs
> using the sco dev sys.
>
> When I compile the program below with optimization, I get the warning
> 'literal value does not fit' from sco's assembler. The warnings come
> from lines like 'andb $-129, 87(%esp)'. I think that "andb" is a
> byte AND operator, and '-129' is tricky to represent in 8-bit two's
> complement format...
>
> The warning only happens when I compile with -O or higher
#include <math.h>
int page_in_style(page_ind, cols, target_slope)
int page_ind;
int *cols;
double target_slope;
{
enum style_factor_enum {
BAD_STYLE_FACTOR = 1000
};
int last_right_col;
int first_left_col;
int page_col;
int bad_area;
int left_height, right_height, max_height;
int hole_count, fill_count, flat_count;
int left_stack_fit, right_stack_fit, hole_fit, fill_fit, flat_fit;
int slope_penalty;
int result;
int temp;
int i;
double slope, slope_diff;
const struct page_tag *page_ptr;
if (slope < 0.0 && slope * target_slope < -0.5) {
right_stack_fit = BAD_STYLE_FACTOR;
} else {
slope_diff = fabs((slope - target_slope) / (1.0 + slope * target_slope));
fprintf("slope %f -> %f target %f -> %f -> diff %f %f\n",
slope, atan(slope) * 180.0 / 3.14159265358979323846 ,
target_slope, atan(target_slope) * 180.0 / 3.14159265358979323846 ,
slope_diff, atan(slope_diff) * 180.0 / 3.14159265358979323846 );
}
}