This is the mail archive of the 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]

Problem with movdf in Sparc64

There is a bug in some of the movdf patterns in 64-bit sparc, but I don't
know what was intended, so I can't suggest a fix.

We have a movdf insn that has an output of MEM and an input of a CONST_DOUBLE
that is not zero.

Reload leaves operand 0 in a MEM, but tries to reload operand 1 into a
register.  But the movdf define_expand calls validize_mem on
force_const_mem.  However, that can't work during reload since a SYMBOL_REF
is not a valid address.

I *think* I understand why this was done.  It was hoped that the last
alternative would be chosen, to reload the MEM instead of a constant and
then use the last alternative (CONST_DOUBLE into general register) which is
split.  But I don't see how to deal with the above problem in that context.

The test case (like most reload problems) is very sensitive to details and
I can't seem to make one in C.  But here's the Ada test case:

procedure Box is

   line_of_sight_db : String (1 .. 4096);
   type Float_T is digits 15;
   prev_min_elevation : Float_T := -3.0;

   if prev_min_elevation < 0.0 then
      prev_min_elevation := 0.0;
   end if;
   when others =>
end Box;

How was this supposd to work?

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