SPARC bugs

Torbjorn Granlund tege@matematik.su.se
Wed Mar 31 03:38:00 GMT 1999


I looked into a crash for the SPARC port under -mcpu=v9.  The crash happens
when executing the output pattern of muldi3_v8plus, with this test case:

  f ()
  {
    unsigned long long __r1;
    __r1 = __r1 * 0x100000000ull;
  }

Pooking around for a while, I found these apparent problems:

  1) No change log entry for when the sparc_check_64 function was added.
  2) The sparc_check_64 looks strange.  Clearly, it is meant to handle just
     registers for the parameter x.  Yet, it doesn't test for that, except
     in a place where I suppose it once crashed.
  3) CONST_DOUBLE_OK_FOR_LETTER_P calls arith_double_operand, which accepts
     non-constant values.  Probably not a visible bugs, but still a bug.
  4) The muldi3_v8plus pattern's output code does not seem prepared to deal
     with the operand types that the predicates accept.
  5) set_extends lacks documentation.

Who is responsible for this mess?  It is hard to clean it up, since
there are so many errors that the author's intensions are unclear.

Torbjörn


More information about the Gcc mailing list