This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap still broken on ia64


This is a CONST_DOUBLE hashing problem.

struct real_value is 24 bytes.  4 bytes of data, 4 bytes of padding, and
16 bytes of data.  The 4 bytes of padding can contain random data.

The problem occurs when we get to const_double_htab_eq in emit_rtl.c.
It compares the entire value of the CONST_DOUBLE, including the random padding
bytes.  So it randomly returns false for CONST_DOUBLEs with identical values.

This causes differences in code generation because CONST_DOUBLE_OK_FOR_LETTER_P
uses a == check against CONST1_RTX to check for 1.0.  This gives a different
result with the stage1 and stage2 compiler because of the hashing problem.

Fixing const_double_htab_eq is probably the easiest solution.  Zeroing out
the padding fields is messy, since every place that defines a local variable
with REAL_VALUE_TYPE needs a bzero, and there are just too many of them.
Changing the exponent size from 29 to 61 to avoid the padding bytes seems
wrong.

That is as far as I've gotten so far.  I haven't tried to write a patch for
const_double_htab_eq yet.  I haven't verified that this will fix the bootstrap
problem.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]